2021-11-13 07:33:01 UTC
184 MB
/opt/openjdk-18
JAVA_VERSION18-ea+11
PATH/opt/openjdk-18/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
[#000] sha256:5758d4e389a3f662e94a85fb76143dbe338b64f8d2a65f45536a9663b05305ad - 1.47% (2.69 MB)
[#001] sha256:6fb1f2a8c1832af12b3b4df7a9b38d22fc1e7a7a20fb69ac04251a15d23a4be3 - 0.48% (906 KB)
[#002] sha256:06542ba5d2058899312e6418f24bc285aea63815567f4ac634fd8b88b79eed6c - 98.05% (180 MB)
/bin/sh -c #(nop) ADD file:5a707b9d6cb5fff532e4c2141bc35707593f21da5528c9e71ae2ddb6ba4a4eb6 in /
2021-11-12 17:19:58 UTC/bin/sh -c #(nop) CMD ["/bin/sh"]
2021-11-13 07:32:47 UTC/bin/sh -c apk add --no-cache java-cacerts
2021-11-13 07:32:47 UTC/bin/sh -c #(nop) ENV JAVA_HOME=/opt/openjdk-18
2021-11-13 07:32:47 UTC/bin/sh -c #(nop) ENV PATH=/opt/openjdk-18/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
2021-11-13 07:32:48 UTC/bin/sh -c #(nop) ENV JAVA_VERSION=18-ea+11
2021-11-13 07:33:01 UTC/bin/sh -c set -eux; arch="$(apk --print-arch)"; case "$arch" in 'x86_64') downloadUrl='https://download.java.net/java/early_access/alpine/11/binaries/openjdk-18-ea+11_linux-x64-musl_bin.tar.gz'; downloadSha256='86fad9069587a5e9dd003e7354a69b2f720a05c12706d2f2345a0c8d90e56c47'; ;; *) echo >&2 "error: unsupported architecture: '$arch'"; exit 1 ;; esac; wget -O openjdk.tgz "$downloadUrl"; echo "$downloadSha256 *openjdk.tgz" | sha256sum -c -; mkdir -p "$JAVA_HOME"; tar --extract --file openjdk.tgz --directory "$JAVA_HOME" --strip-components 1 --no-same-owner ; rm openjdk.tgz*; rm -rf "$JAVA_HOME/lib/security/cacerts"; ln -sT /etc/ssl/certs/java/cacerts "$JAVA_HOME/lib/security/cacerts"; java -Xshare:dump; fileEncoding="$(echo 'System.out.println(System.getProperty("file.encoding"))' | jshell -s -)"; [ "$fileEncoding" = 'UTF-8' ]; rm -rf ~/.java; javac --version; java --version
2021-11-13 07:33:01 UTC/bin/sh -c #(nop) CMD ["jshell"]
Please be careful as this will not just delete the reference but also the actual content!
For example when you have latest and v1.2.3 both pointing to the same image
the deletion of latest will also permanently remove v1.2.3.