-
-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
229 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
# ------------------------------------------------------------------------------ | ||
# NOTE: THIS DOCKERFILE 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 debian:sid-slim | ||
|
||
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; \ | ||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ | ||
wget \ | ||
# 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 \ | ||
# jlink --strip-debug on 13+ needs objcopy: https://github.com/docker-library/openjdk/issues/351 | ||
# Error: java.io.IOException: Cannot run program "objcopy": error=2, No such file or directory | ||
binutils \ | ||
tzdata \ | ||
# locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8 | ||
locales \ | ||
; \ | ||
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 jdk-21.0.2+13 | ||
|
||
RUN set -eux; \ | ||
ARCH="$(dpkg --print-architecture)"; \ | ||
case "${ARCH}" in \ | ||
riscv64) \ | ||
ESUM='791a37ddb040e1a02bbfc61abfbc7e7321431a28054c9ac59ba1738fd5320b02'; \ | ||
BINARY_URL='https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.2%2B13/OpenJDK21U-jdk_riscv64_linux_hotspot_21.0.2_13.tar.gz'; \ | ||
;; \ | ||
*) \ | ||
echo "Unsupported arch: ${ARCH}"; \ | ||
exit 1; \ | ||
;; \ | ||
esac; \ | ||
wget --progress=dot:giga -O /tmp/openjdk.tar.gz ${BINARY_URL}; \ | ||
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; \ | ||
# 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; \ | ||
# https://github.com/docker-library/openjdk/issues/212#issuecomment-420979840 | ||
# https://openjdk.java.net/jeps/341 | ||
java -Xshare:dump; | ||
|
||
RUN 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." | ||
COPY entrypoint.sh /__cacert_entrypoint.sh | ||
ENTRYPOINT ["/__cacert_entrypoint.sh"] | ||
|
||
CMD ["jshell"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
# ------------------------------------------------------------------------------ | ||
# NOTE: THIS DOCKERFILE 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 debian:sid-slim | ||
|
||
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; \ | ||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ | ||
wget \ | ||
# 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 \ | ||
; \ | ||
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 jdk-21.0.2+13 | ||
|
||
RUN set -eux; \ | ||
ARCH="$(dpkg --print-architecture)"; \ | ||
case "${ARCH}" in \ | ||
riscv64) \ | ||
ESUM='efdeca282553229aa20d909ab9f5fb14eee52b56067a5598e6c649ef5f99a63d'; \ | ||
BINARY_URL='https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.2%2B13/OpenJDK21U-jre_riscv64_linux_hotspot_21.0.2_13.tar.gz'; \ | ||
;; \ | ||
*) \ | ||
echo "Unsupported arch: ${ARCH}"; \ | ||
exit 1; \ | ||
;; \ | ||
esac; \ | ||
wget --progress=dot:giga -O /tmp/openjdk.tar.gz ${BINARY_URL}; \ | ||
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; \ | ||
# 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; \ | ||
# https://github.com/docker-library/openjdk/issues/212#issuecomment-420979840 | ||
# https://openjdk.java.net/jeps/341 | ||
java -Xshare:dump; | ||
|
||
RUN set -eux; \ | ||
echo "Verifying install ..."; \ | ||
echo "java --version"; java --version; \ | ||
echo "Complete." | ||
COPY entrypoint.sh /__cacert_entrypoint.sh | ||
ENTRYPOINT ["/__cacert_entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{% include 'partials/license.j2' %} | ||
|
||
FROM {{ base_image }} | ||
|
||
{% include 'partials/nix-env.j2' %} | ||
|
||
RUN set -eux; \ | ||
apt-get update; \ | ||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ | ||
wget \ | ||
# 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 \ | ||
{% include 'partials/binutils.j2' -%} | ||
tzdata \ | ||
# locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8 | ||
locales \ | ||
; \ | ||
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 {{ java_version }} | ||
|
||
{% include 'partials/multi-arch-install.j2' %} \ | ||
# 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; \ | ||
{% if version|int >= 11 -%} | ||
ldconfig; \ | ||
# https://github.com/docker-library/openjdk/issues/212#issuecomment-420979840 | ||
# https://openjdk.java.net/jeps/341 | ||
java -Xshare:dump; | ||
{% else -%} | ||
ldconfig; | ||
{% endif %} | ||
{% include 'partials/version-check.j2' %} | ||
COPY entrypoint.sh /__cacert_entrypoint.sh | ||
ENTRYPOINT ["/__cacert_entrypoint.sh"] | ||
{% include 'partials/jshell.j2' %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters