# ------------------------------------------------------------------------------ # NOTE: THIS FILE IS GENERATED VIA "generate_dockerfiles.py" # # PLEASE DO NOT EDIT IT DIRECTLY. # ------------------------------------------------------------------------------ # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # FROM ubuntu:22.04 ENV JAVA_HOME=/opt/java/openjdk ENV PATH=$JAVA_HOME/bin:$PATH # Default to UTF-8 file.encoding ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' RUN set -eux; \ apt-get update; \ arch="$(dpkg --print-architecture)"; \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ # curl required for historical reasons, see https://github.com/adoptium/containers/issues/255 curl \ wget \ # gnupg required to verify the signature gnupg \ # java.lang.UnsatisfiedLinkError: libfontmanager.so: libfreetype.so.6: cannot open shared object file: No such file or directory # java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11FontManager # https://github.com/docker-library/openjdk/pull/235#issuecomment-424466077 fontconfig \ # utilities for keeping Ubuntu and OpenJDK CA certificates in sync # https://github.com/adoptium/containers/issues/293 ca-certificates p11-kit \ tzdata \ # locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8 locales \ # Java 8 on 32-bit ARM needs libatomic.so.1 $(if [ "$arch" = armhf ]; then echo libatomic1; fi) \ ; \ echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen; \ locale-gen en_US.UTF-8; \ rm -rf /var/lib/apt/lists/* ENV JAVA_VERSION=jdk8u514-b01 RUN set -eux; \ ARCH="$(dpkg --print-architecture)"; \ case "${ARCH}" in \ amd64) \ ESUM='27eda854481d20806d918b30cdd417c6bed4fd15882e24f3595dc8ae7fb5d095'; \ BINARY_URL='https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u514-b01/OpenJDK8U-jdk_x64_linux_hotspot_8u514b01.tar.gz'; \ ;; \ arm64) \ ESUM='41e3284f630ba8d3543e7f7395ae433406bedff926c23ce70a97373aa8930f92'; \ BINARY_URL='https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u514-b01/OpenJDK8U-jdk_aarch64_linux_hotspot_8u514b01.tar.gz'; \ ;; \ armhf) \ ESUM='41f8991f2625089500a51f9c78a5e25369fc71de857bb35ebb47767b44c26d4d'; \ BINARY_URL='https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u514-b01/OpenJDK8U-jdk_arm_linux_hotspot_8u514b01.tar.gz'; \ ;; \ ppc64el) \ ESUM='75c11f9a1d6dff3748d12f214405883b6271f1fde02e582a0816306a67ba6ff1'; \ BINARY_URL='https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u514-b01/OpenJDK8U-jdk_ppc64le_linux_hotspot_8u514b01.tar.gz'; \ ;; \ *) \ echo "Unsupported arch: ${ARCH}"; \ exit 1; \ ;; \ esac; \ wget --progress=dot:giga -O /tmp/openjdk.tar.gz ${BINARY_URL}; \ wget --progress=dot:giga -O /tmp/openjdk.tar.gz.sig ${BINARY_URL}.sig; \ export GNUPGHOME="$(mktemp -d)"; \ # gpg: key 843C48A565F8F04B: "Adoptium GPG Key (DEB/RPM Signing Key) " imported gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 3B04D753C9050D9A5D343F39843C48A565F8F04B; \ gpg --batch --verify /tmp/openjdk.tar.gz.sig /tmp/openjdk.tar.gz; \ rm -rf "${GNUPGHOME}" /tmp/openjdk.tar.gz.sig; \ echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ mkdir -p "$JAVA_HOME"; \ tar --extract \ --file /tmp/openjdk.tar.gz \ --directory "$JAVA_HOME" \ --strip-components 1 \ --no-same-owner \ ; \ rm -f /tmp/openjdk.tar.gz ${JAVA_HOME}/src.zip; \ # https://github.com/docker-library/openjdk/issues/331#issuecomment-498834472 find "$JAVA_HOME/lib" -name '*.so' -exec dirname '{}' ';' | sort -u > /etc/ld.so.conf.d/docker-openjdk.conf; \ ldconfig; RUN set -eux; \ echo "Verifying install ..."; \ echo "javac -version"; javac -version; \ echo "java -version"; java -version; \ echo "Complete." COPY --chmod=755 entrypoint.sh /__cacert_entrypoint.sh ENTRYPOINT ["/__cacert_entrypoint.sh"]