testserver (latest)
Published 2024-11-13 06:24:23 +00:00 by 2vb
Installation
docker pull git.twovb.xyz/2vb/testserver:latest
sha256:a1e215270bd0bc6c3effbe2fa364cff642111320359c168b1cfbfde22a4a9aad
Image Layers
ADD alpine-minirootfs-3.20.3-x86_64.tar.gz / # buildkit |
CMD ["/bin/sh"] |
ENV JAVA_HOME=/opt/java/openjdk |
ENV PATH=/opt/java/openjdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin |
ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 |
RUN /bin/sh -c set -eux; apk add --no-cache fontconfig ttf-dejavu gnupg ca-certificates p11-kit-trust musl-locales musl-locales-lang binutils tzdata coreutils openssl ; rm -rf /var/cache/apk/* # buildkit |
ENV JAVA_VERSION=jdk-21.0.5+11 |
RUN /bin/sh -c set -eux; ARCH="$(apk --print-arch)"; case "${ARCH}" in aarch64) ESUM='f22e32b869dd0e5e3f248646f62bffaa307b360299488ac8764e622923d7e747'; BINARY_URL='https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.5%2B11/OpenJDK21U-jdk_aarch64_alpine-linux_hotspot_21.0.5_11.tar.gz'; ;; x86_64) ESUM='8da7da49101d45f646272616f20e8b10d57472bbf5961d64ffb07d7ba93c6909'; BINARY_URL='https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.5%2B11/OpenJDK21U-jdk_x64_alpine-linux_hotspot_21.0.5_11.tar.gz'; ;; *) echo "Unsupported arch: ${ARCH}"; exit 1; ;; esac; wget -O /tmp/openjdk.tar.gz ${BINARY_URL}; wget -O /tmp/openjdk.tar.gz.sig ${BINARY_URL}.sig; export GNUPGHOME="$(mktemp -d)"; gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 3B04D753C9050D9A5D343F39843C48A565F8F04B; gpg --batch --verify /tmp/openjdk.tar.gz.sig /tmp/openjdk.tar.gz; rm -r "${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}/lib/src.zip; # buildkit |
RUN /bin/sh -c set -eux; echo "Verifying install ..."; fileEncoding="$(echo 'System.out.println(System.getProperty("file.encoding"))' | jshell -s -)"; [ "$fileEncoding" = 'UTF-8' ]; rm -rf ~/.java; echo "javac --version"; javac --version; echo "java --version"; java --version; echo "Complete." # buildkit |
COPY --chmod=755 entrypoint.sh /__cacert_entrypoint.sh # buildkit |
ENTRYPOINT ["/__cacert_entrypoint.sh"] |
CMD ["jshell"] |
USER 1000:1000 |
WORKDIR /server |
COPY --chown=1000:1000 /server/server/ /server # buildkit |
ENTRYPOINT ["/server/start.sh"] |