Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ language: bash
sudo: 9000

env:
- VERSION=openjdk-9-jre
- VERSION=openjdk-9-jdk
- VERSION=openjdk-8-jre
- VERSION=openjdk-8-jdk
- VERSION=openjdk-7-jre
Expand Down
4 changes: 3 additions & 1 deletion generate-stackbrew-library.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ for version in "${versions[@]}"; do
if [ "${fullVersion%-*}" != "$fullVersion" ]; then
bases+=( $flavor-${fullVersion%-*} ) # like "8u40-b09
fi
bases+=( $flavor-$javaVersion )
if [ "$javaVersion" != "${fullVersion%-*}" ]; then
bases+=( $flavor-$javaVersion )
fi
if [ "$flavor" = "$defaultFlavor" ]; then
for base in "${bases[@]}"; do
bases+=( "${base#$flavor-}" )
Expand Down
37 changes: 37 additions & 0 deletions openjdk-9-jdk/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
FROM buildpack-deps:sid-curl

# A few problems with compiling Java from source:
# 1. Oracle. Licensing prevents us from redistributing the official JDK.
# 2. Compiling OpenJDK also requires the JDK to be installed, and it gets
# really hairy.

RUN apt-get update && apt-get install -y unzip && rm -rf /var/lib/apt/lists/*

RUN echo 'deb http://httpredir.debian.org/debian experimental main' > /etc/apt/sources.list.d/experimental.list

# Default to UTF-8 file.encoding
ENV LANG C.UTF-8

ENV JAVA_VERSION 9~b88
ENV JAVA_DEBIAN_VERSION 9~b88-1

# see https://bugs.debian.org/775775
# and https://github.com/docker-library/java/issues/19#issuecomment-70546872
ENV CA_CERTIFICATES_JAVA_VERSION 20140324

RUN set -x \
&& apt-get update \
&& apt-get install -y \
openjdk-9-jdk="$JAVA_DEBIAN_VERSION" \
ca-certificates-java="$CA_CERTIFICATES_JAVA_VERSION" \
&& rm -rf /var/lib/apt/lists/*

# see CA_CERTIFICATES_JAVA_VERSION notes above
RUN /var/lib/dpkg/info/ca-certificates-java.postinst configure

# see https://bugs.debian.org/793210
# and https://github.com/docker-library/java/issues/46#issuecomment-119026586
RUN apt-get update && apt-get install -y --no-install-recommends libfontconfig1 && rm -rf /var/lib/apt/lists/*

# If you're reading this and have any feedback on how this image could be
# improved, please open an issue or a pull request so we can discuss it!
37 changes: 37 additions & 0 deletions openjdk-9-jre/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
FROM buildpack-deps:sid-curl

# A few problems with compiling Java from source:
# 1. Oracle. Licensing prevents us from redistributing the official JDK.
# 2. Compiling OpenJDK also requires the JDK to be installed, and it gets
# really hairy.

RUN apt-get update && apt-get install -y unzip && rm -rf /var/lib/apt/lists/*

RUN echo 'deb http://httpredir.debian.org/debian experimental main' > /etc/apt/sources.list.d/experimental.list

# Default to UTF-8 file.encoding
ENV LANG C.UTF-8

ENV JAVA_VERSION 9~b88
ENV JAVA_DEBIAN_VERSION 9~b88-1

# see https://bugs.debian.org/775775
# and https://github.com/docker-library/java/issues/19#issuecomment-70546872
ENV CA_CERTIFICATES_JAVA_VERSION 20140324

RUN set -x \
&& apt-get update \
&& apt-get install -y \
openjdk-9-jre-headless="$JAVA_DEBIAN_VERSION" \
ca-certificates-java="$CA_CERTIFICATES_JAVA_VERSION" \
&& rm -rf /var/lib/apt/lists/*

# see CA_CERTIFICATES_JAVA_VERSION notes above
RUN /var/lib/dpkg/info/ca-certificates-java.postinst configure

# see https://bugs.debian.org/793210
# and https://github.com/docker-library/java/issues/46#issuecomment-119026586
RUN apt-get update && apt-get install -y --no-install-recommends libfontconfig1 && rm -rf /var/lib/apt/lists/*

# If you're reading this and have any feedback on how this image could be
# improved, please open an issue or a pull request so we can discuss it!
7 changes: 6 additions & 1 deletion update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,15 @@ for version in "${versions[@]}"; do
dist+="-backports"
fi

# we don't have buildpack-deps:experimental-* so we use sid and add a source
if grep -q experimental "$version/Dockerfile"; then
dist="${dist%:sid}:experimental"
fi

fullVersion=
case "$flavor" in
openjdk)
debianVersion="$(set -x; docker run --rm "$dist" bash -c "apt-get update &> /dev/null && apt-cache show $flavor-$javaVersion-$javaType | grep '^Version: ' | head -1 | cut -d' ' -f2")"
debianVersion="$(set -x; docker run --rm "$dist" bash -c "apt-get update -qq && apt-cache show $flavor-$javaVersion-$javaType | awk -F ': ' '\$1 == \"Version\" { print \$2; exit }'")"
fullVersion="${debianVersion%%-*}"
;;
esac
Expand Down