99# REQUIRED FILES TO BUILD THIS IMAGE
1010# ----------------------------------
1111# This dockerfile will download a copy of JDK 21 from
12- # https://download.oracle.com/java/21/latest/jdk-21_linux-<ARCH>_bin.tar.gz
13- #
12+ # https://download.oracle.com/java/21/latest/jdk-21_linux-<ARCH>_bin.tar.gz
13+ #
1414# It will use either x64 or aarch64 depending on the target platform
1515#
1616# HOW TO BUILD THIS IMAGE
@@ -29,14 +29,14 @@ LABEL maintainer="Aurelio Garcia-Ribeyro <aurelio.garciaribeyro@oracle.com>"
2929
3030# Since the files are compressed as tar.gz first dnf install tar. gzip is already in oraclelinux:9
3131RUN set -eux; \
32- dnf install -y tar;
33-
32+ dnf install -y tar;
33+
3434# Default to UTF-8 file.encoding
3535ENV LANG en_US.UTF-8
3636
3737# Environment variables for the builder image.
3838# Required to validate that you are using the correct file
39-
39+
4040ENV JAVA_URL=https://download.oracle.com/java/21/latest \
4141 JAVA_HOME=/usr/java/jdk-21
4242
@@ -49,30 +49,30 @@ RUN set -eux; \
4949 then ARCH="x64"; \
5050 fi && \
5151 JAVA_PKG="$JAVA_URL"/jdk-21_linux-"${ARCH}"_bin.tar.gz ; \
52- JAVA_SHA256=$(curl "$JAVA_PKG".sha256) ; \
52+ JAVA_SHA256=$(curl "$JAVA_PKG".sha256) ; \
5353 curl --output /tmp/jdk.tgz "$JAVA_PKG" && \
5454 echo "$JAVA_SHA256" */tmp/jdk.tgz | sha256sum -c; \
5555 mkdir -p "$JAVA_HOME"; \
5656 tar --extract --file /tmp/jdk.tgz --directory "$JAVA_HOME" --strip-components 1
57-
58- ## Get a fresh version of OL9 for the final image
57+
58+ ## Get a fresh version of Oracle Linux 9 for the final image
5959FROM oraclelinux:9
6060
6161# Default to UTF-8 file.encoding
6262ENV LANG en_US.UTF-8
6363ENV JAVA_HOME=/usr/java/jdk-21
64- ENV PATH $JAVA_HOME/bin:$PATH
64+ ENV PATH $JAVA_HOME/bin:$PATH
6565
66- # If you need the Java Version you can read it from the release file with
66+ # If you need the Java Version you can read it from the release file with
6767# JAVA_VERSION=$(sed -n '/^JAVA_VERSION="/{s///;s/"//;p;}' "$JAVA_HOME"/release);
6868
6969# Copy the uncompressed Java Runtime from the builder image
7070COPY --from=builder $JAVA_HOME $JAVA_HOME
7171
7272RUN set -eux; \
73- # Ensure we get the latest OL 9 updates available at build time
73+ # Ensure we get the latest Oracle Linux 9 updates available at build time
7474 dnf -y update; \
75- # JDK assumes freetype is available
75+ # JDK assumes freetype is available
7676 dnf install -y \
7777 freetype fontconfig \
7878 ; \
@@ -84,5 +84,5 @@ RUN set -eux; \
8484 [ ! -e "/usr/bin/$base" ]; \
8585 alternatives --install "/usr/bin/$base" "$base" "$bin" 20000; \
8686 done;
87-
87+
8888CMD ["jshell"]
0 commit comments