diff --git a/6/Dockerfile b/6/Dockerfile index 906d5b32..f0ab5dcd 100644 --- a/6/Dockerfile +++ b/6/Dockerfile @@ -5,7 +5,9 @@ FROM debian:wheezy # 2. Compiling OpenJDK also requires the JDK to be installed, and it gets # really hairy. -RUN apt-get update && apt-get install -y curl openjdk-6-jdk=6b32* wget +ENV JAVA_VERSION 6b32 + +RUN apt-get update && apt-get install -y curl openjdk-6-jdk="$JAVA_VERSION"* unzip wget # 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! diff --git a/7/Dockerfile b/7/Dockerfile index 27d674db..6b8cd085 100644 --- a/7/Dockerfile +++ b/7/Dockerfile @@ -5,7 +5,9 @@ FROM debian:jessie # 2. Compiling OpenJDK also requires the JDK to be installed, and it gets # really hairy. -RUN apt-get update && apt-get install -y curl openjdk-7-jdk=7u60* wget +ENV JAVA_VERSION 7u65 + +RUN apt-get update && apt-get install -y curl openjdk-7-jdk="$JAVA_VERSION"* unzip wget # 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! diff --git a/8/Dockerfile b/8/Dockerfile index ebcf47f9..5f68bb18 100644 --- a/8/Dockerfile +++ b/8/Dockerfile @@ -5,7 +5,9 @@ FROM debian:experimental # 2. Compiling OpenJDK also requires the JDK to be installed, and it gets # really hairy. -RUN apt-get update && apt-get install -y curl openjdk-8-jdk=8u20* wget +ENV JAVA_VERSION 8u20 + +RUN apt-get update && apt-get install -y curl openjdk-8-jdk="$JAVA_VERSION"* unzip wget # 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! diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh new file mode 100755 index 00000000..77d8ab6d --- /dev/null +++ b/generate-stackbrew-library.sh @@ -0,0 +1,26 @@ +#!/bin/bash +set -e + +declare -A aliases +aliases=( + [7]='latest' +) + +cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" + +versions=( */ ) +versions=( "${versions[@]%/}" ) +url='git://github.com/docker-library/docker-java' + +echo '# maintainer: InfoSiftr (@infosiftr)' + +for version in "${versions[@]}"; do + commit="$(git log -1 --format='format:%H' "$version")" + fullVersion="$(grep -m1 'ENV JAVA_VERSION ' "$version/Dockerfile" | cut -d' ' -f3)" + versionAliases=( $fullVersion $version ${aliases[$version]} ) + + echo + for va in "${versionAliases[@]}"; do + echo "$va: ${url}@${commit} $version" + done +done