Skip to content

Commit

Permalink
removed trailing spaces and replaced OL with Oracle Linux in the comm…
Browse files Browse the repository at this point in the history
…ents

Signed-off-by: Aurelio Garcia-Ribeyro <[email protected]>
  • Loading branch information
aureliogrb authored and Djelibeybi committed Oct 16, 2024
1 parent 6156518 commit d966621
Show file tree
Hide file tree
Showing 11 changed files with 66 additions and 67 deletions.
18 changes: 9 additions & 9 deletions OracleJava/11/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ FROM oraclelinux:7-slim as builder
LABEL maintainer="Aurelio Garcia-Ribeyro <[email protected]>"

RUN yum install -y gzip tar


# Default to UTF-8 file.encoding
ENV LANG en_US.UTF-8

Expand All @@ -50,21 +50,21 @@ RUN set -eux; \
JAVA_SHA256=d22d0fcca761861a1eb2f5f6eb116c933354e8b1f76b3cda189c722cc0177c98 ; \
else \
mv "$(ls /tmp/jdk-11*_linux-aarch64_bin.tar.gz)" /tmp/jdk.tar.gz ; \
JAVA_SHA256=3fc0d93f6363d32723c293ba5a9016e8ab27410351ed804020cfe71e87d3bc0a ; \
JAVA_SHA256=3fc0d93f6363d32723c293ba5a9016e8ab27410351ed804020cfe71e87d3bc0a ; \
fi && \
echo "$JAVA_SHA256 */tmp/jdk.tar.gz" | sha256sum -c -; \
mkdir -p "$JAVA_HOME"; \
tar --extract --file /tmp/jdk.tar.gz --directory "$JAVA_HOME" --strip-components 1
## Get a fresh version of SLIM for the final image

## Get a fresh version of Oracle Linux 7-slim for the final image
FROM oraclelinux:7-slim

# Default to UTF-8 file.encoding
ENV LANG en_US.UTF-8

ENV JAVA_HOME=/usr/java/jdk-11

ENV PATH $JAVA_HOME/bin:$PATH
ENV PATH $JAVA_HOME/bin:$PATH

# Copy the uncompressed Java Runtime from the builder image
COPY --from=builder $JAVA_HOME $JAVA_HOME
Expand All @@ -73,7 +73,7 @@ RUN set -eux; \
# Update the base image
yum -y update; \
yum install -y \
# JDK assumes freetype is available
# JDK assumes freetype is available
freetype fontconfig \
; \
rm -rf /var/cache/yum; \
Expand All @@ -84,7 +84,7 @@ RUN set -eux; \
[ ! -e "/usr/bin/$base" ]; \
alternatives --install "/usr/bin/$base" "$base" "$bin" 20000; \
done; \
# -Xshare:dump will create a CDS archive to improve startup in subsequent runs
java -Xshare:dump;
# -Xshare:dump will create a CDS archive to improve startup in subsequent runs
java -Xshare:dump;

CMD ["jshell"]
2 changes: 1 addition & 1 deletion OracleJava/11/Dockerfile.ol8
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ RUN set -eux; \
mkdir -p "$JAVA_HOME"; \
tar --extract --file /tmp/jdk.tar.gz --directory "$JAVA_HOME" --strip-components 1

## Get a fresh version of OL8 for the final image
## Get a fresh version of Oracle Linux 8 for the final image
FROM oraclelinux:8

# Default to UTF-8 file.encoding
Expand Down
12 changes: 6 additions & 6 deletions OracleJava/17/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,16 @@ RUN set -eux; \
echo "$JAVA_SHA256 */tmp/jdk.tar.gz" | sha256sum -c -; \
mkdir -p "$JAVA_HOME"; \
tar --extract --file /tmp/jdk.tar.gz --directory "$JAVA_HOME" --strip-components 1
## Get a fresh version of OL8 for the final image

## Get a fresh version of Oracle Linux 8 for the final image
FROM oraclelinux:8

# Default to UTF-8 file.encoding
ENV LANG en_US.UTF-8
ENV JAVA_HOME=/usr/java/jdk-17
ENV PATH $JAVA_HOME/bin:$PATH
ENV PATH $JAVA_HOME/bin:$PATH

# If you need the Java Version you can read it from the release file with
# If you need the Java Version you can read it from the release file with
# JAVA_VERSION=$(sed -n '/^JAVA_VERSION="/{s///;s/"//;p;}' "$JAVA_HOME"/release);

# Copy the uncompressed Java Runtime from the builder image
Expand All @@ -71,7 +71,7 @@ COPY --from=builder $JAVA_HOME $JAVA_HOME
RUN set -eux; \
# Ensure we get the latest OL 8 updates available at build time
dnf -y update; \
# JDK assumes freetype is available
# JDK assumes freetype is available
dnf install -y \
freetype fontconfig \
; \
Expand All @@ -83,5 +83,5 @@ RUN set -eux; \
[ ! -e "/usr/bin/$base" ]; \
alternatives --install "/usr/bin/$base" "$base" "$bin" 20000; \
done;

CMD ["jshell"]
24 changes: 12 additions & 12 deletions OracleJava/21/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
# REQUIRED FILES TO BUILD THIS IMAGE
# ----------------------------------
# This dockerfile will download a copy of JDK 21 from
# https://download.oracle.com/java/21/latest/jdk-21_linux-<ARCH>_bin.tar.gz
#
# https://download.oracle.com/java/21/latest/jdk-21_linux-<ARCH>_bin.tar.gz
#
# It will use either x64 or aarch64 depending on the target platform
#
# HOW TO BUILD THIS IMAGE
Expand All @@ -29,14 +29,14 @@ LABEL maintainer="Aurelio Garcia-Ribeyro <[email protected]>"

# Since the files are compressed as tar.gz first dnf install tar. gzip is already in oraclelinux:8
RUN set -eux; \
dnf install -y tar;
dnf install -y tar;

# Default to UTF-8 file.encoding
ENV LANG en_US.UTF-8

# Environment variables for the builder image.
# Required to validate that you are using the correct file

ENV JAVA_URL=https://download.oracle.com/java/21/latest \
JAVA_HOME=/usr/java/jdk-21

Expand All @@ -49,21 +49,21 @@ RUN set -eux; \
then ARCH="x64"; \
fi && \
JAVA_PKG="$JAVA_URL"/jdk-21_linux-"${ARCH}"_bin.tar.gz ; \
JAVA_SHA256=$(curl "$JAVA_PKG".sha256) ; \
JAVA_SHA256=$(curl "$JAVA_PKG".sha256) ; \
curl --output /tmp/jdk.tgz "$JAVA_PKG" && \
echo "$JAVA_SHA256" */tmp/jdk.tgz | sha256sum -c; \
mkdir -p "$JAVA_HOME"; \
tar --extract --file /tmp/jdk.tgz --directory "$JAVA_HOME" --strip-components 1
## Get a fresh version of OL8 for the final image

## Get a fresh version of Oracle Linux 8 for the final image
FROM oraclelinux:8

# Default to UTF-8 file.encoding
ENV LANG en_US.UTF-8
ENV JAVA_HOME=/usr/java/jdk-21
ENV PATH $JAVA_HOME/bin:$PATH
ENV PATH $JAVA_HOME/bin:$PATH

# If you need the Java Version you can read it from the release file with
# If you need the Java Version you can read it from the release file with
# JAVA_VERSION=$(sed -n '/^JAVA_VERSION="/{s///;s/"//;p;}' "$JAVA_HOME"/release);

# Copy the uncompressed Java Runtime from the builder image
Expand All @@ -72,7 +72,7 @@ COPY --from=builder $JAVA_HOME $JAVA_HOME
RUN set -eux; \
# Ensure we get the latest OL 8 updates available at build time
dnf -y update; \
# JDK assumes freetype is available
# JDK assumes freetype is available
dnf install -y \
freetype fontconfig \
; \
Expand All @@ -84,5 +84,5 @@ RUN set -eux; \
[ ! -e "/usr/bin/$base" ]; \
alternatives --install "/usr/bin/$base" "$base" "$bin" 20000; \
done;

CMD ["jshell"]
26 changes: 13 additions & 13 deletions OracleJava/21/Dockerfile.ol9
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
# REQUIRED FILES TO BUILD THIS IMAGE
# ----------------------------------
# This dockerfile will download a copy of JDK 21 from
# https://download.oracle.com/java/21/latest/jdk-21_linux-<ARCH>_bin.tar.gz
#
# https://download.oracle.com/java/21/latest/jdk-21_linux-<ARCH>_bin.tar.gz
#
# It will use either x64 or aarch64 depending on the target platform
#
# HOW TO BUILD THIS IMAGE
Expand All @@ -29,14 +29,14 @@ LABEL maintainer="Aurelio Garcia-Ribeyro <[email protected]>"

# Since the files are compressed as tar.gz first dnf install tar. gzip is already in oraclelinux:9
RUN set -eux; \
dnf install -y tar;
dnf install -y tar;

# Default to UTF-8 file.encoding
ENV LANG en_US.UTF-8

# Environment variables for the builder image.
# Required to validate that you are using the correct file

ENV JAVA_URL=https://download.oracle.com/java/21/latest \
JAVA_HOME=/usr/java/jdk-21

Expand All @@ -49,30 +49,30 @@ RUN set -eux; \
then ARCH="x64"; \
fi && \
JAVA_PKG="$JAVA_URL"/jdk-21_linux-"${ARCH}"_bin.tar.gz ; \
JAVA_SHA256=$(curl "$JAVA_PKG".sha256) ; \
JAVA_SHA256=$(curl "$JAVA_PKG".sha256) ; \
curl --output /tmp/jdk.tgz "$JAVA_PKG" && \
echo "$JAVA_SHA256" */tmp/jdk.tgz | sha256sum -c; \
mkdir -p "$JAVA_HOME"; \
tar --extract --file /tmp/jdk.tgz --directory "$JAVA_HOME" --strip-components 1
## Get a fresh version of OL9 for the final image

## Get a fresh version of Oracle Linux 9 for the final image
FROM oraclelinux:9

# Default to UTF-8 file.encoding
ENV LANG en_US.UTF-8
ENV JAVA_HOME=/usr/java/jdk-21
ENV PATH $JAVA_HOME/bin:$PATH
ENV PATH $JAVA_HOME/bin:$PATH

# If you need the Java Version you can read it from the release file with
# If you need the Java Version you can read it from the release file with
# JAVA_VERSION=$(sed -n '/^JAVA_VERSION="/{s///;s/"//;p;}' "$JAVA_HOME"/release);

# Copy the uncompressed Java Runtime from the builder image
COPY --from=builder $JAVA_HOME $JAVA_HOME

RUN set -eux; \
# Ensure we get the latest OL 9 updates available at build time
# Ensure we get the latest Oracle Linux 9 updates available at build time
dnf -y update; \
# JDK assumes freetype is available
# JDK assumes freetype is available
dnf install -y \
freetype fontconfig \
; \
Expand All @@ -84,5 +84,5 @@ RUN set -eux; \
[ ! -e "/usr/bin/$base" ]; \
alternatives --install "/usr/bin/$base" "$base" "$bin" 20000; \
done;

CMD ["jshell"]
26 changes: 13 additions & 13 deletions OracleJava/23/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
# REQUIRED FILES TO BUILD THIS IMAGE
# ----------------------------------
# This dockerfile will download a copy of JDK 23 from
# https://download.oracle.com/java/23/latest/jdk-23_linux-<ARCH>_bin.tar.gz
#
# https://download.oracle.com/java/23/latest/jdk-23_linux-<ARCH>_bin.tar.gz
#
# It will use either x64 or aarch64 depending on the target platform
#
# HOW TO BUILD THIS IMAGE
Expand All @@ -29,14 +29,14 @@ LABEL maintainer="Aurelio Garcia-Ribeyro <[email protected]>"

# Since the files are compressed as tar.gz first dnf install tar. gzip is already in oraclelinux:9
RUN set -eux; \
dnf install -y tar;
dnf install -y tar;

# Default to UTF-8 file.encoding
ENV LANG en_US.UTF-8

# Environment variables for the builder image.
# Required to validate that you are using the correct file

ENV JAVA_URL=https://download.oracle.com/java/23/latest \
JAVA_HOME=/usr/java/jdk-23

Expand All @@ -49,30 +49,30 @@ RUN set -eux; \
then ARCH="x64"; \
fi && \
JAVA_PKG="$JAVA_URL"/jdk-23_linux-"${ARCH}"_bin.tar.gz ; \
JAVA_SHA256=$(curl "$JAVA_PKG".sha256) ; \
JAVA_SHA256=$(curl "$JAVA_PKG".sha256) ; \
curl --output /tmp/jdk.tgz "$JAVA_PKG" && \
echo "$JAVA_SHA256" */tmp/jdk.tgz | sha256sum -c; \
mkdir -p "$JAVA_HOME"; \
tar --extract --file /tmp/jdk.tgz --directory "$JAVA_HOME" --strip-components 1
## Get a fresh version of OL8 for the final image

## Get a fresh version of Oracle Linux 9 for the final image
FROM oraclelinux:9

# Default to UTF-8 file.encoding
ENV LANG en_US.UTF-8
ENV JAVA_HOME=/usr/java/jdk-23
ENV PATH $JAVA_HOME/bin:$PATH
ENV PATH $JAVA_HOME/bin:$PATH

# If you need the Java Version you can read it from the release file with
# If you need the Java Version you can read it from the release file with
# JAVA_VERSION=$(sed -n '/^JAVA_VERSION="/{s///;s/"//;p;}' "$JAVA_HOME"/release);

# Copy the uncompressed Java Runtime from the builder image
COPY --from=builder $JAVA_HOME $JAVA_HOME

RUN set -eux; \
# Ensure we get the latest OL 8 updates available at build time
# Ensure we get the latest Oracle Linux 8 updates available at build time
dnf -y update; \
# JDK assumes freetype is available
# JDK assumes freetype is available
dnf install -y \
freetype fontconfig \
; \
Expand All @@ -84,5 +84,5 @@ RUN set -eux; \
[ ! -e "/usr/bin/$base" ]; \
alternatives --install "/usr/bin/$base" "$base" "$bin" 20000; \
done;

CMD ["jshell"]
2 changes: 1 addition & 1 deletion OracleJava/23/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
#
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.

echo "Building Oracle JDK 23 on Oracle Linux 0"
echo "Building Oracle JDK 23 on Oracle Linux 9"
docker build --file Dockerfile --tag oracle/jdk:23-ol9 .
15 changes: 7 additions & 8 deletions OracleJava/8/jdk/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2024 Oracle and/or its affiliates.
# Copyright (c) 2024 Oracle and/or its affiliates.
#
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
#
Expand Down Expand Up @@ -48,20 +48,20 @@ RUN set -eux; \
JAVA_SHA256=b396978a716b7d23ccccabfe5c47c3b75d2434d7f8f7af690bc648172382720d ; \
else \
mv "$(ls /tmp/jdk-8*-linux-aarch64.tar.gz)" /tmp/jdk.tar.gz ; \
JAVA_SHA256=e68d3e31ffcf7f05a4de65d04974843073bdff238bb6524adb272de9e616be7c ; \
JAVA_SHA256=e68d3e31ffcf7f05a4de65d04974843073bdff238bb6524adb272de9e616be7c ; \
fi && \
echo "$JAVA_SHA256 */tmp/jdk.tar.gz" | sha256sum -c -; \
mkdir -p "$JAVA_HOME"; \
tar --extract --file /tmp/jdk.tar.gz --directory "$JAVA_HOME" --strip-components 1

## Get a fresh version of SLIM for the final image
## Get a fresh version of Oracle Linux 7-slim for the final image
FROM oraclelinux:7-slim

# Default to UTF-8 file.encoding
ENV LANG en_US.UTF-8

ENV JAVA_HOME=/usr/java/jdk-8
ENV JAVA_HOME=/usr/java/jdk-8

ENV PATH $JAVA_HOME/bin:$PATH

# Copy the uncompressed Java Runtime from the builder image
Expand All @@ -77,8 +77,7 @@ RUN yum -y update; \
[ ! -e "/usr/bin/$base" ]; \
alternatives --install "/usr/bin/$base" "$base" "$bin" 20000; \
done; \
# -Xshare:dump will create a CDS archive to improve startup in subsequent runs
# the file will be stored as /usr/java/jdk-8/jre/lib/amd64/server/classes.jsa
# -Xshare:dump will create a CDS archive to improve startup in subsequent runs
# the file will be stored as /usr/java/jdk-8/jre/lib/amd64/server/classes.jsa
# See https://docs.oracle.com/javase/8/docs/technotes/guides/vm/class-data-sharing.html
java -Xshare:dump;

4 changes: 2 additions & 2 deletions OracleJava/8/jdk/Dockerfile.ol8
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ RUN set -eux; \
JAVA_SHA256=b396978a716b7d23ccccabfe5c47c3b75d2434d7f8f7af690bc648172382720d ; \
else \
mv "$(ls /tmp/jdk-8*-linux-aarch64.tar.gz)" /tmp/jdk.tar.gz ; \
JAVA_SHA256=e68d3e31ffcf7f05a4de65d04974843073bdff238bb6524adb272de9e616be7c ; \
JAVA_SHA256=e68d3e31ffcf7f05a4de65d04974843073bdff238bb6524adb272de9e616be7c ; \
fi && \
echo "$JAVA_SHA256 */tmp/jdk.tar.gz" | sha256sum -c -; \
mkdir -p "$JAVA_HOME"; \
tar --extract --file /tmp/jdk.tar.gz --directory "$JAVA_HOME" --strip-components 1

## Get a fresh version of OL 8 for the final image
## Get a fresh version of Oracle Linux 8 for the final image

FROM oraclelinux:8

Expand Down
Loading

0 comments on commit d966621

Please sign in to comment.