Skip to content

Commit

Permalink
Add initial all-Oracle variants (oraclelinux + jdk.java.net tarballs)
Browse files Browse the repository at this point in the history
  • Loading branch information
tianon committed Sep 25, 2018
1 parent ea58310 commit 621c488
Show file tree
Hide file tree
Showing 22 changed files with 438 additions and 70 deletions.
13 changes: 10 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@ language: bash
services: docker

env:
- VERSION=12 VARIANT=oracle
- VERSION=12 VARIANT=alpine
- VERSION=11 VARIANT=oracle
- VERSION=11
- VERSION=11 VARIANT=slim
- VERSION=10 VARIANT=oracle
- VERSION=10
- VERSION=10 VARIANT=slim
- VERSION=8
Expand All @@ -27,9 +31,12 @@ script:
(
set -Eeuo pipefail
set -x
travis_retry docker build -t "$imageBase-jdk$imageSuffix" "jdk${VARIANT:+/$VARIANT}"
travis_retry docker build -t "$imageBase-jre$imageSuffix" "jre${VARIANT:+/$VARIANT}"
~/official-images/test/run.sh "$imageBase-jdk$imageSuffix" "$imageBase-jre$imageSuffix"
docker build -t "$imageBase-jdk$imageSuffix" "jdk${VARIANT:+/$VARIANT}"
~/official-images/test/run.sh "$imageBase-jdk$imageSuffix"
if [ -d "jre${VARIANT:+/$VARIANT}" ]; then
docker build -t "$imageBase-jre$imageSuffix" "jre${VARIANT:+/$VARIANT}"
~/official-images/test/run.sh "$imageBase-jre$imageSuffix"
fi
)
after_script:
Expand Down
50 changes: 50 additions & 0 deletions 10/jdk/oracle/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
FROM oraclelinux:7-slim

RUN set -eux; \
yum install -y \
gzip \
tar \
; \
rm -rf /var/cache/yum

# Default to UTF-8 file.encoding
#ENV LANG C.UTF-8
# TODO oraclelinux doesn't have C.UTF-8 by default??

ENV JAVA_HOME /usr/java/openjdk-10
ENV PATH $JAVA_HOME/bin:$PATH

# http://jdk.java.net/
ENV JAVA_VERSION 10.0.2
ENV JAVA_URL https://download.java.net/java/GA/jdk10/10.0.2/19aef61b38124481863b1413dce1855f/13/openjdk-10.0.2_linux-x64_bin.tar.gz
ENV JAVA_SHA256 f3b26abc9990a0b8929781310e14a339a7542adfd6596afb842fa0dd7e3848b2

RUN set -eux; \
\
curl -fL -o /openjdk.tgz "$JAVA_URL"; \
echo "$JAVA_SHA256 */openjdk.tgz" | sha256sum -c -; \
mkdir -p "$JAVA_HOME"; \
tar --extract --file /openjdk.tgz --directory "$JAVA_HOME" --strip-components 1; \
rm /openjdk.tgz; \
\
# https://github.com/oracle/docker-images/blob/a56e0d1ed968ff669d2e2ba8a1483d0f3acc80c0/OracleJava/java-8/Dockerfile#L17-L19
ln -sfT "$JAVA_HOME" /usr/java/default; \
ln -sfT "$JAVA_HOME" /usr/java/latest; \
for bin in "$JAVA_HOME/bin/"*; do \
base="$(basename "$bin")"; \
[ ! -e "/usr/bin/$base" ]; \
alternatives --install "/usr/bin/$base" "$base" "$bin" 20000; \
done; \
\
# https://github.com/docker-library/openjdk/issues/212#issuecomment-420979840
# http://openjdk.java.net/jeps/341
java -Xshare:dump; \
\
# basic smoke test
java --version; \
javac --version

# https://docs.oracle.com/javase/10/tools/jshell.htm
# https://docs.oracle.com/javase/10/jshell/
# https://en.wikipedia.org/wiki/JShell
CMD ["jshell"]
4 changes: 2 additions & 2 deletions 10/jdk/windows/nanoserver-sac2016/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ RUN $url = ('https://github.com/ojdkbuild/ojdkbuild/releases/download/{0}/{1}' -
; \
\
Write-Host 'Verifying install ...'; \
Write-Host ' java -version'; java -version; \
Write-Host ' javac -version'; javac -version; \
Write-Host ' java --version'; java --version; \
Write-Host ' javac --version'; javac --version; \
\
Write-Host 'Removing ...'; \
Remove-Item ojdkbuild.zip -Force; \
Expand Down
4 changes: 2 additions & 2 deletions 10/jdk/windows/windowsservercore-1709/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ RUN $url = ('https://github.com/ojdkbuild/ojdkbuild/releases/download/{0}/{1}' -
; \
\
Write-Host 'Verifying install ...'; \
Write-Host ' java -version'; java -version; \
Write-Host ' javac -version'; javac -version; \
Write-Host ' java --version'; java --version; \
Write-Host ' javac --version'; javac --version; \
\
Write-Host 'Removing ...'; \
Remove-Item ojdkbuild.zip -Force; \
Expand Down
4 changes: 2 additions & 2 deletions 10/jdk/windows/windowsservercore-ltsc2016/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ RUN $url = ('https://github.com/ojdkbuild/ojdkbuild/releases/download/{0}/{1}' -
; \
\
Write-Host 'Verifying install ...'; \
Write-Host ' java -version'; java -version; \
Write-Host ' javac -version'; javac -version; \
Write-Host ' java --version'; java --version; \
Write-Host ' javac --version'; javac --version; \
\
Write-Host 'Removing ...'; \
Remove-Item ojdkbuild.zip -Force; \
Expand Down
50 changes: 50 additions & 0 deletions 11/jdk/oracle/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
FROM oraclelinux:7-slim

RUN set -eux; \
yum install -y \
gzip \
tar \
; \
rm -rf /var/cache/yum

# Default to UTF-8 file.encoding
#ENV LANG C.UTF-8
# TODO oraclelinux doesn't have C.UTF-8 by default??

ENV JAVA_HOME /usr/java/openjdk-11
ENV PATH $JAVA_HOME/bin:$PATH

# http://jdk.java.net/
ENV JAVA_VERSION 11-ea+28
ENV JAVA_URL https://download.java.net/java/early_access/jdk11/28/GPL/openjdk-11+28_linux-x64_bin.tar.gz
ENV JAVA_SHA256 3784cfc4670f0d4c5482604c7c513beb1a92b005f569df9bf100e8bef6610f2e

RUN set -eux; \
\
curl -fL -o /openjdk.tgz "$JAVA_URL"; \
echo "$JAVA_SHA256 */openjdk.tgz" | sha256sum -c -; \
mkdir -p "$JAVA_HOME"; \
tar --extract --file /openjdk.tgz --directory "$JAVA_HOME" --strip-components 1; \
rm /openjdk.tgz; \
\
# https://github.com/oracle/docker-images/blob/a56e0d1ed968ff669d2e2ba8a1483d0f3acc80c0/OracleJava/java-8/Dockerfile#L17-L19
ln -sfT "$JAVA_HOME" /usr/java/default; \
ln -sfT "$JAVA_HOME" /usr/java/latest; \
for bin in "$JAVA_HOME/bin/"*; do \
base="$(basename "$bin")"; \
[ ! -e "/usr/bin/$base" ]; \
alternatives --install "/usr/bin/$base" "$base" "$bin" 20000; \
done; \
\
# https://github.com/docker-library/openjdk/issues/212#issuecomment-420979840
# http://openjdk.java.net/jeps/341
java -Xshare:dump; \
\
# basic smoke test
java --version; \
javac --version

# https://docs.oracle.com/javase/10/tools/jshell.htm
# https://docs.oracle.com/javase/10/jshell/
# https://en.wikipedia.org/wiki/JShell
CMD ["jshell"]
6 changes: 3 additions & 3 deletions 11/jdk/windows/windowsservercore-1709/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM microsoft/windowsservercore:1709
# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]

ENV JAVA_HOME C:\\jdk-11
ENV JAVA_HOME C:\\openjdk-11
RUN $newPath = ('{0}\bin;{1}' -f $env:JAVA_HOME, $env:PATH); \
Write-Host ('Updating PATH: {0}' -f $newPath); \
# Nano Server does not have "[Environment]::SetEnvironmentVariable()"
Expand All @@ -27,8 +27,8 @@ RUN Write-Host ('Downloading {0} ...' -f $env:JAVA_URL); \
Expand-Archive openjdk.zip -DestinationPath C:\; \
\
Write-Host 'Verifying install ...'; \
Write-Host ' java -version'; java -version; \
Write-Host ' javac -version'; javac -version; \
Write-Host ' java --version'; java --version; \
Write-Host ' javac --version'; javac --version; \
\
Write-Host 'Removing ...'; \
Remove-Item openjdk.zip -Force; \
Expand Down
6 changes: 3 additions & 3 deletions 11/jdk/windows/windowsservercore-1803/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM microsoft/windowsservercore:1803
# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]

ENV JAVA_HOME C:\\jdk-11
ENV JAVA_HOME C:\\openjdk-11
RUN $newPath = ('{0}\bin;{1}' -f $env:JAVA_HOME, $env:PATH); \
Write-Host ('Updating PATH: {0}' -f $newPath); \
# Nano Server does not have "[Environment]::SetEnvironmentVariable()"
Expand All @@ -27,8 +27,8 @@ RUN Write-Host ('Downloading {0} ...' -f $env:JAVA_URL); \
Expand-Archive openjdk.zip -DestinationPath C:\; \
\
Write-Host 'Verifying install ...'; \
Write-Host ' java -version'; java -version; \
Write-Host ' javac -version'; javac -version; \
Write-Host ' java --version'; java --version; \
Write-Host ' javac --version'; javac --version; \
\
Write-Host 'Removing ...'; \
Remove-Item openjdk.zip -Force; \
Expand Down
6 changes: 3 additions & 3 deletions 11/jdk/windows/windowsservercore-ltsc2016/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM microsoft/windowsservercore:ltsc2016
# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]

ENV JAVA_HOME C:\\jdk-11
ENV JAVA_HOME C:\\openjdk-11
RUN $newPath = ('{0}\bin;{1}' -f $env:JAVA_HOME, $env:PATH); \
Write-Host ('Updating PATH: {0}' -f $newPath); \
# Nano Server does not have "[Environment]::SetEnvironmentVariable()"
Expand All @@ -27,8 +27,8 @@ RUN Write-Host ('Downloading {0} ...' -f $env:JAVA_URL); \
Expand-Archive openjdk.zip -DestinationPath C:\; \
\
Write-Host 'Verifying install ...'; \
Write-Host ' java -version'; java -version; \
Write-Host ' javac -version'; javac -version; \
Write-Host ' java --version'; java --version; \
Write-Host ' javac --version'; javac --version; \
\
Write-Host 'Removing ...'; \
Remove-Item openjdk.zip -Force; \
Expand Down
31 changes: 31 additions & 0 deletions 12/jdk/alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
FROM alpine:3.8

ENV JAVA_HOME /opt/openjdk-12
ENV PATH $JAVA_HOME/bin:$PATH

# http://jdk.java.net/
ENV JAVA_VERSION 12-ea+12
ENV JAVA_URL https://download.java.net/java/early_access/alpine/12/binaries/openjdk-12-ea+12_linux-x64-musl_bin.tar.gz
ENV JAVA_SHA256 36729ff2deec675c87fefbee47b805ad1555192f424ca4debeb81f30eb1bf587
# "For Alpine Linux, builds are produced on a reduced schedule and may not be in sync with the other platforms."

RUN set -eux; \
\
wget -O /openjdk.tgz "$JAVA_URL"; \
echo "$JAVA_SHA256 */openjdk.tgz" | sha256sum -c -; \
mkdir -p "$JAVA_HOME"; \
tar --extract --file /openjdk.tgz --directory "$JAVA_HOME" --strip-components 1; \
rm /openjdk.tgz; \
\
# https://github.com/docker-library/openjdk/issues/212#issuecomment-420979840
# http://openjdk.java.net/jeps/341
java -Xshare:dump; \
\
# basic smoke test
java --version; \
javac --version

# https://docs.oracle.com/javase/10/tools/jshell.htm
# https://docs.oracle.com/javase/10/jshell/
# https://en.wikipedia.org/wiki/JShell
CMD ["jshell"]
50 changes: 50 additions & 0 deletions 12/jdk/oracle/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
FROM oraclelinux:7-slim

RUN set -eux; \
yum install -y \
gzip \
tar \
; \
rm -rf /var/cache/yum

# Default to UTF-8 file.encoding
#ENV LANG C.UTF-8
# TODO oraclelinux doesn't have C.UTF-8 by default??

ENV JAVA_HOME /usr/java/openjdk-12
ENV PATH $JAVA_HOME/bin:$PATH

# http://jdk.java.net/
ENV JAVA_VERSION 12-ea+12
ENV JAVA_URL https://download.java.net/java/early_access/jdk12/12/GPL/openjdk-12-ea+12_linux-x64_bin.tar.gz
ENV JAVA_SHA256 7cf6802479fe3a884642250640938e8ee9d4ce61c517779921ecbe04fe491456

RUN set -eux; \
\
curl -fL -o /openjdk.tgz "$JAVA_URL"; \
echo "$JAVA_SHA256 */openjdk.tgz" | sha256sum -c -; \
mkdir -p "$JAVA_HOME"; \
tar --extract --file /openjdk.tgz --directory "$JAVA_HOME" --strip-components 1; \
rm /openjdk.tgz; \
\
# https://github.com/oracle/docker-images/blob/a56e0d1ed968ff669d2e2ba8a1483d0f3acc80c0/OracleJava/java-8/Dockerfile#L17-L19
ln -sfT "$JAVA_HOME" /usr/java/default; \
ln -sfT "$JAVA_HOME" /usr/java/latest; \
for bin in "$JAVA_HOME/bin/"*; do \
base="$(basename "$bin")"; \
[ ! -e "/usr/bin/$base" ]; \
alternatives --install "/usr/bin/$base" "$base" "$bin" 20000; \
done; \
\
# https://github.com/docker-library/openjdk/issues/212#issuecomment-420979840
# http://openjdk.java.net/jeps/341
java -Xshare:dump; \
\
# basic smoke test
java --version; \
javac --version

# https://docs.oracle.com/javase/10/tools/jshell.htm
# https://docs.oracle.com/javase/10/jshell/
# https://en.wikipedia.org/wiki/JShell
CMD ["jshell"]
6 changes: 3 additions & 3 deletions 12/jdk/windows/windowsservercore-1709/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM microsoft/windowsservercore:1709
# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]

ENV JAVA_HOME C:\\jdk-12
ENV JAVA_HOME C:\\openjdk-12
RUN $newPath = ('{0}\bin;{1}' -f $env:JAVA_HOME, $env:PATH); \
Write-Host ('Updating PATH: {0}' -f $newPath); \
# Nano Server does not have "[Environment]::SetEnvironmentVariable()"
Expand All @@ -27,8 +27,8 @@ RUN Write-Host ('Downloading {0} ...' -f $env:JAVA_URL); \
Expand-Archive openjdk.zip -DestinationPath C:\; \
\
Write-Host 'Verifying install ...'; \
Write-Host ' java -version'; java -version; \
Write-Host ' javac -version'; javac -version; \
Write-Host ' java --version'; java --version; \
Write-Host ' javac --version'; javac --version; \
\
Write-Host 'Removing ...'; \
Remove-Item openjdk.zip -Force; \
Expand Down
6 changes: 3 additions & 3 deletions 12/jdk/windows/windowsservercore-1803/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM microsoft/windowsservercore:1803
# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]

ENV JAVA_HOME C:\\jdk-12
ENV JAVA_HOME C:\\openjdk-12
RUN $newPath = ('{0}\bin;{1}' -f $env:JAVA_HOME, $env:PATH); \
Write-Host ('Updating PATH: {0}' -f $newPath); \
# Nano Server does not have "[Environment]::SetEnvironmentVariable()"
Expand All @@ -27,8 +27,8 @@ RUN Write-Host ('Downloading {0} ...' -f $env:JAVA_URL); \
Expand-Archive openjdk.zip -DestinationPath C:\; \
\
Write-Host 'Verifying install ...'; \
Write-Host ' java -version'; java -version; \
Write-Host ' javac -version'; javac -version; \
Write-Host ' java --version'; java --version; \
Write-Host ' javac --version'; javac --version; \
\
Write-Host 'Removing ...'; \
Remove-Item openjdk.zip -Force; \
Expand Down
6 changes: 3 additions & 3 deletions 12/jdk/windows/windowsservercore-ltsc2016/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM microsoft/windowsservercore:ltsc2016
# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]

ENV JAVA_HOME C:\\jdk-12
ENV JAVA_HOME C:\\openjdk-12
RUN $newPath = ('{0}\bin;{1}' -f $env:JAVA_HOME, $env:PATH); \
Write-Host ('Updating PATH: {0}' -f $newPath); \
# Nano Server does not have "[Environment]::SetEnvironmentVariable()"
Expand All @@ -27,8 +27,8 @@ RUN Write-Host ('Downloading {0} ...' -f $env:JAVA_URL); \
Expand-Archive openjdk.zip -DestinationPath C:\; \
\
Write-Host 'Verifying install ...'; \
Write-Host ' java -version'; java -version; \
Write-Host ' javac -version'; javac -version; \
Write-Host ' java --version'; java --version; \
Write-Host ' javac --version'; javac --version; \
\
Write-Host 'Removing ...'; \
Remove-Item openjdk.zip -Force; \
Expand Down
4 changes: 2 additions & 2 deletions 8/jdk/windows/nanoserver-sac2016/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ RUN $url = ('https://github.com/ojdkbuild/ojdkbuild/releases/download/{0}/{1}' -
; \
\
Write-Host 'Verifying install ...'; \
Write-Host ' java -version'; java -version; \
Write-Host ' javac -version'; javac -version; \
Write-Host ' java --version'; java --version; \
Write-Host ' javac --version'; javac --version; \
\
Write-Host 'Removing ...'; \
Remove-Item ojdkbuild.zip -Force; \
Expand Down
4 changes: 2 additions & 2 deletions 8/jdk/windows/windowsservercore-1709/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ RUN $url = ('https://github.com/ojdkbuild/ojdkbuild/releases/download/{0}/{1}' -
; \
\
Write-Host 'Verifying install ...'; \
Write-Host ' java -version'; java -version; \
Write-Host ' javac -version'; javac -version; \
Write-Host ' java --version'; java --version; \
Write-Host ' javac --version'; javac --version; \
\
Write-Host 'Removing ...'; \
Remove-Item ojdkbuild.zip -Force; \
Expand Down
4 changes: 2 additions & 2 deletions 8/jdk/windows/windowsservercore-ltsc2016/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ RUN $url = ('https://github.com/ojdkbuild/ojdkbuild/releases/download/{0}/{1}' -
; \
\
Write-Host 'Verifying install ...'; \
Write-Host ' java -version'; java -version; \
Write-Host ' javac -version'; javac -version; \
Write-Host ' java --version'; java --version; \
Write-Host ' javac --version'; javac --version; \
\
Write-Host 'Removing ...'; \
Remove-Item ojdkbuild.zip -Force; \
Expand Down
Loading

0 comments on commit 621c488

Please sign in to comment.