calculator (latest)
Published 2024-11-26 11:10:35 +00:00 by sadika6036
Installation
docker pull demo.gitea.com/sadika6036/calculator:latest
sha256:7b0b4589dc0ca1abcd96d3fedfb99835b92af7238a769bcb85fbd7e6bd7bc0d8
Image Layers
ADD file:909c07f3bad92a80d3917d583769a01bf62c2cbf3dd24f450fb303b1db92a83e in / |
CMD ["/bin/bash"] |
/bin/sh -c set -eux; microdnf install gzip tar binutils freetype fontconfig ; microdnf clean all |
ENV JAVA_HOME=/usr/java/openjdk-21 |
ENV PATH=/usr/java/openjdk-21/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin |
ENV LANG=C.UTF-8 |
ENV JAVA_VERSION=21 |
/bin/sh -c set -eux; arch="$(objdump="$(command -v objdump)" && objdump --file-headers "$objdump" | awk -F '[:,]+[[:space:]]+' '$1 == "architecture" { print $2 }')"; case "$arch" in 'i386:x86-64') downloadUrl='https://download.java.net/java/GA/jdk21/fd2272bbf8e04c3dbaee13770090416c/35/GPL/openjdk-21_linux-x64_bin.tar.gz'; downloadSha256='a30c454a9bef8f46d5f1bf3122830014a8fbe7ac03b5f8729bc3add4b92a1d0a'; ;; 'aarch64') downloadUrl='https://download.java.net/java/GA/jdk21/fd2272bbf8e04c3dbaee13770090416c/35/GPL/openjdk-21_linux-aarch64_bin.tar.gz'; downloadSha256='e8f4ed1a69815ddf56d7da365116eefc1e5a1159396dffee3dd21616a86d5d28'; ;; *) echo >&2 "error: unsupported architecture: '$arch'"; exit 1 ;; esac; curl -fL -o openjdk.tgz "$downloadUrl"; echo "$downloadSha256 *openjdk.tgz" | sha256sum --strict --check -; 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/pki/ca-trust/extracted/java/cacerts "$JAVA_HOME/lib/security/cacerts"; 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; java -Xshare:dump; fileEncoding="$(echo 'System.out.println(System.getProperty("file.encoding"))' | jshell -s -)"; [ "$fileEncoding" = 'UTF-8' ]; rm -rf ~/.java; javac --version; java --version |
CMD ["jshell"] |
COPY target/demo-0.0.1-SNAPSHOT.jar app.jar # buildkit |
ENTRYPOINT ["java" "-jar" "/app.jar"] |