From 19543de0a2f28bcf51857ff9b7292ca204bfd19f Mon Sep 17 00:00:00 2001 From: Staffan Olsson Date: Sun, 8 Apr 2018 07:07:41 +0200 Subject: [PATCH 1/2] Builds a JDK 10 docker image --- jdk-oracle-open/Dockerfile | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 jdk-oracle-open/Dockerfile diff --git a/jdk-oracle-open/Dockerfile b/jdk-oracle-open/Dockerfile new file mode 100644 index 0000000..8e68235 --- /dev/null +++ b/jdk-oracle-open/Dockerfile @@ -0,0 +1,22 @@ +FROM debian:stretch-slim@sha256:613efd414e9818dcef858201484a94603a548a0e04fd4356e77eb758aeb16124 + +RUN set -ex; \ + export DEBIAN_FRONTEND=noninteractive; \ + runDeps=''; \ + buildDeps='curl ca-certificates'; \ + apt-get update && apt-get install -y $runDeps $buildDeps --no-install-recommends; \ + \ + cd /usr/lib; \ + mkdir jvm; \ + cd jvm; \ + curl -SLs -o jdk.tar.gz https://download.java.net/java/GA/jdk10/10/binaries/openjdk-10_linux-x64_bin.tar.gz; \ + echo "c851df838a51af52517b74e3a4b251d90c54cf478a4ebed99e7285ef134c3435 jdk.tar.gz" | sha256sum -c -; \ + tar xvzf jdk.tar.gz; \ + rm jdk.tar.gz; \ + \ + apt-get purge -y --auto-remove $buildDeps; \ + rm -rf /var/lib/apt/lists/*; \ + rm -rf /var/log/dpkg.log /var/log/alternatives.log /var/log/apt + +# Instead of: find /usr/lib/jvm/jdk-10/bin/ -executable -exec ln -s '{}' /usr/local/bin/ +ENV PATH="$PATH:/usr/lib/jvm/jdk-10/bin" From 11990bdd007b35a7235c6768a21d1f76a2389ca9 Mon Sep 17 00:00:00 2001 From: Staffan Olsson Date: Sun, 8 Apr 2018 07:22:38 +0200 Subject: [PATCH 2/2] Java is now a 278MB layer --- jdk-oracle-open/Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jdk-oracle-open/Dockerfile b/jdk-oracle-open/Dockerfile index 8e68235..bd78cb0 100644 --- a/jdk-oracle-open/Dockerfile +++ b/jdk-oracle-open/Dockerfile @@ -14,6 +14,9 @@ RUN set -ex; \ tar xvzf jdk.tar.gz; \ rm jdk.tar.gz; \ \ + rm -v jdk-10/lib/src.zip; \ + rm -r jdk-10/man/; \ + \ apt-get purge -y --auto-remove $buildDeps; \ rm -rf /var/lib/apt/lists/*; \ rm -rf /var/log/dpkg.log /var/log/alternatives.log /var/log/apt