Skip to content

Commit

Permalink
further dockerfile refactor enhancements
Browse files Browse the repository at this point in the history
  • Loading branch information
gdams committed Oct 26, 2023
1 parent 585b61f commit ed44873
Show file tree
Hide file tree
Showing 52 changed files with 549 additions and 351 deletions.
19 changes: 15 additions & 4 deletions 11/jdk/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,21 @@ ENV PATH $JAVA_HOME/bin:$PATH
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'

RUN set -eux; \
# fontconfig and ttf-dejavu added to support serverside image generation by Java programs
# java-cacerts added to support adding CA certificates to the Java keystore
# bash is required for the entrypoint script (see https://github.com/adoptium/containers/issues/415)
apk add --no-cache fontconfig java-cacerts bash libretls musl-locales musl-locales-lang ttf-dejavu tzdata zlib; \
apk add --no-cache \
# bash is required for the entrypoint script
# see https://github.com/adoptium/containers/issues/415
bash \
# fontconfig and ttf-dejavu added to support serverside image generation by Java programs
fontconfig ttf-dejavu \
# java-cacerts added to support adding CA certificates to the Java keystore
java-cacerts \
# fixes issues with apk del apk-tools
# see https://github.com/adoptium/containers/issues/136
libretls zlib \
# locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8
musl-locales musl-locales-lang \
tzdata \
; \
rm -rf /var/cache/apk/*

ENV JAVA_VERSION jdk-11.0.21+9
Expand Down
22 changes: 11 additions & 11 deletions 11/jdk/centos/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@ ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'

RUN set -eux; \
yum install -y \
gzip \
tar \
# curl required for historical reasons, see https://github.com/adoptium/containers/issues/255
curl \
wget \
tzdata \
openssl \
# utilities for keeping Ubuntu and OpenJDK CA certificates in sync
# https://github.com/adoptium/containers/issues/293
ca-certificates \
fontconfig \
gzip \
tar \
# curl required for historical reasons, see https://github.com/adoptium/containers/issues/255
curl \
wget \
tzdata \
openssl \
# utilities for keeping Centos and OpenJDK CA certificates in sync
# https://github.com/adoptium/containers/issues/293
ca-certificates \
fontconfig \
; \
rm -rf /var/cache/yum

Expand Down
13 changes: 12 additions & 1 deletion 11/jdk/ubi/ubi9-minimal/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,18 @@ ENV PATH $JAVA_HOME/bin:$PATH
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'

RUN set -eux; \
microdnf install -y binutils tzdata openssl wget ca-certificates fontconfig glibc-langpack-en gzip tar; \
microdnf install -y \
gzip \
tar \
tzdata \
openssl \
wget \
# utilities for keeping UBI and OpenJDK CA certificates in sync
# https://github.com/adoptium/containers/issues/293
ca-certificates \
fontconfig \
glibc-langpack-en \
; \
microdnf clean all

ENV JAVA_VERSION jdk-11.0.21+9
Expand Down
20 changes: 10 additions & 10 deletions 11/jdk/ubuntu/focal/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ 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 \
# curl required for historical reasons, see https://github.com/adoptium/containers/issues/255
curl \
wget \
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 \
# curl required for historical reasons, see https://github.com/adoptium/containers/issues/255
curl \
wget \
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; \
Expand Down
20 changes: 10 additions & 10 deletions 11/jdk/ubuntu/jammy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ 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 \
# curl required for historical reasons, see https://github.com/adoptium/containers/issues/255
curl \
wget \
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 \
# curl required for historical reasons, see https://github.com/adoptium/containers/issues/255
curl \
wget \
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; \
Expand Down
8 changes: 4 additions & 4 deletions 11/jdk/windows/nanoserver-1809/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ USER ContainerUser

COPY --from=eclipse-temurin:11.0.21_9-jdk-windowsservercore-1809 $JAVA_HOME $JAVA_HOME

RUN echo "Verifying install ..."; \
echo "javac --version"; javac --version; \
echo "java --version"; java --version; \
echo "Complete."
RUN echo Verifying install ... \
&& echo javac --version && javac --version \
&& echo java --version && java --version \
&& echo Complete.

CMD ["jshell"]
8 changes: 4 additions & 4 deletions 11/jdk/windows/nanoserver-ltsc2022/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ USER ContainerUser

COPY --from=eclipse-temurin:11.0.21_9-jdk-windowsservercore-ltsc2022 $JAVA_HOME $JAVA_HOME

RUN echo "Verifying install ..."; \
echo "javac --version"; javac --version; \
echo "java --version"; java --version; \
echo "Complete."
RUN echo Verifying install ... \
&& echo javac --version && javac --version \
&& echo java --version && java --version \
&& echo Complete.

CMD ["jshell"]
19 changes: 15 additions & 4 deletions 11/jre/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,21 @@ ENV PATH $JAVA_HOME/bin:$PATH
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'

RUN set -eux; \
# fontconfig and ttf-dejavu added to support serverside image generation by Java programs
# java-cacerts added to support adding CA certificates to the Java keystore
# bash is required for the entrypoint script (see https://github.com/adoptium/containers/issues/415)
apk add --no-cache fontconfig java-cacerts bash libretls musl-locales musl-locales-lang ttf-dejavu tzdata zlib; \
apk add --no-cache \
# bash is required for the entrypoint script
# see https://github.com/adoptium/containers/issues/415
bash \
# fontconfig and ttf-dejavu added to support serverside image generation by Java programs
fontconfig ttf-dejavu \
# java-cacerts added to support adding CA certificates to the Java keystore
java-cacerts \
# fixes issues with apk del apk-tools
# see https://github.com/adoptium/containers/issues/136
libretls zlib \
# locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8
musl-locales musl-locales-lang \
tzdata \
; \
rm -rf /var/cache/apk/*

ENV JAVA_VERSION jdk-11.0.21+9
Expand Down
22 changes: 11 additions & 11 deletions 11/jre/centos/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@ ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'

RUN set -eux; \
yum install -y \
gzip \
tar \
# curl required for historical reasons, see https://github.com/adoptium/containers/issues/255
curl \
wget \
tzdata \
openssl \
# utilities for keeping Ubuntu and OpenJDK CA certificates in sync
# https://github.com/adoptium/containers/issues/293
ca-certificates \
fontconfig \
gzip \
tar \
# curl required for historical reasons, see https://github.com/adoptium/containers/issues/255
curl \
wget \
tzdata \
openssl \
# utilities for keeping Centos and OpenJDK CA certificates in sync
# https://github.com/adoptium/containers/issues/293
ca-certificates \
fontconfig \
; \
rm -rf /var/cache/yum

Expand Down
13 changes: 12 additions & 1 deletion 11/jre/ubi/ubi9-minimal/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,18 @@ ENV PATH $JAVA_HOME/bin:$PATH
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'

RUN set -eux; \
microdnf install -y binutils tzdata openssl wget ca-certificates fontconfig glibc-langpack-en gzip tar; \
microdnf install -y \
gzip \
tar \
tzdata \
openssl \
wget \
# utilities for keeping UBI and OpenJDK CA certificates in sync
# https://github.com/adoptium/containers/issues/293
ca-certificates \
fontconfig \
glibc-langpack-en \
; \
microdnf clean all

ENV JAVA_VERSION jdk-11.0.21+9
Expand Down
20 changes: 10 additions & 10 deletions 11/jre/ubuntu/focal/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ 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 \
# curl required for historical reasons, see https://github.com/adoptium/containers/issues/255
curl \
wget \
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 \
# curl required for historical reasons, see https://github.com/adoptium/containers/issues/255
curl \
wget \
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; \
Expand Down
20 changes: 10 additions & 10 deletions 11/jre/ubuntu/jammy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ 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 \
# curl required for historical reasons, see https://github.com/adoptium/containers/issues/255
curl \
wget \
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 \
# curl required for historical reasons, see https://github.com/adoptium/containers/issues/255
curl \
wget \
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; \
Expand Down
6 changes: 3 additions & 3 deletions 11/jre/windows/nanoserver-1809/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ USER ContainerUser

COPY --from=eclipse-temurin:11.0.21_9-jre-windowsservercore-1809 $JAVA_HOME $JAVA_HOME

RUN echo "Verifying install ..."; \
echo "java --version"; java --version; \
echo "Complete."
RUN echo Verifying install ... \
&& echo java --version && java --version \
&& echo Complete.
6 changes: 3 additions & 3 deletions 11/jre/windows/nanoserver-ltsc2022/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ USER ContainerUser

COPY --from=eclipse-temurin:11.0.21_9-jre-windowsservercore-ltsc2022 $JAVA_HOME $JAVA_HOME

RUN echo "Verifying install ..."; \
echo "java --version"; java --version; \
echo "Complete."
RUN echo Verifying install ... \
&& echo java --version && java --version \
&& echo Complete.
22 changes: 18 additions & 4 deletions 17/jdk/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,24 @@ ENV PATH $JAVA_HOME/bin:$PATH
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'

RUN set -eux; \
# fontconfig and ttf-dejavu added to support serverside image generation by Java programs
# java-cacerts added to support adding CA certificates to the Java keystore
# bash is required for the entrypoint script (see https://github.com/adoptium/containers/issues/415)
apk add --no-cache fontconfig java-cacerts bash libretls musl-locales musl-locales-lang ttf-dejavu tzdata zlib; \
apk add --no-cache \
# bash is required for the entrypoint script
# see https://github.com/adoptium/containers/issues/415
bash \
# fontconfig and ttf-dejavu added to support serverside image generation by Java programs
fontconfig ttf-dejavu \
# java-cacerts added to support adding CA certificates to the Java keystore
java-cacerts \
# fixes issues with apk del apk-tools
# see https://github.com/adoptium/containers/issues/136
libretls zlib \
# locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8
musl-locales musl-locales-lang \
# 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 \
; \
rm -rf /var/cache/apk/*

ENV JAVA_VERSION jdk-17.0.9+9
Expand Down
28 changes: 14 additions & 14 deletions 17/jdk/centos/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,20 @@ ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'

RUN set -eux; \
yum install -y \
gzip \
tar \
# curl required for historical reasons, see https://github.com/adoptium/containers/issues/255
curl \
wget \
tzdata \
openssl \
# utilities for keeping Ubuntu and OpenJDK CA certificates in sync
# https://github.com/adoptium/containers/issues/293
ca-certificates \
fontconfig \
# 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 \
gzip \
tar \
# curl required for historical reasons, see https://github.com/adoptium/containers/issues/255
curl \
wget \
tzdata \
openssl \
# utilities for keeping Centos and OpenJDK CA certificates in sync
# https://github.com/adoptium/containers/issues/293
ca-certificates \
# 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 \
fontconfig \
; \
rm -rf /var/cache/yum

Expand Down
16 changes: 15 additions & 1 deletion 17/jdk/ubi/ubi9-minimal/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,21 @@ ENV PATH $JAVA_HOME/bin:$PATH
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'

RUN set -eux; \
microdnf install -y binutils tzdata openssl wget ca-certificates fontconfig glibc-langpack-en gzip tar; \
microdnf install -y \
gzip \
tar \
# 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 \
openssl \
wget \
# utilities for keeping UBI and OpenJDK CA certificates in sync
# https://github.com/adoptium/containers/issues/293
ca-certificates \
fontconfig \
glibc-langpack-en \
; \
microdnf clean all

ENV JAVA_VERSION jdk-17.0.9+9
Expand Down
Loading

0 comments on commit ed44873

Please sign in to comment.