Skip to content

Commit a59dee4

Browse files
aureliogrbDjelibeybi
authored andcommitted
changed copyright year, fixed indentation"
Signed-off-by: Aurelio Garcia-Ribeyro <aurelio.garciaribeyro@oracle.com>
1 parent 1bafb1c commit a59dee4

File tree

14 files changed

+263
-264
lines changed

14 files changed

+263
-264
lines changed

OracleJava/11/Dockerfile

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# $ docker build -t oracle/jdk:11 .
2020
#
2121
# This command is already scripted in build.sh so you can alternatively run
22-
# $ bash build.sh
22+
# $ bash build.sh
2323
#
2424
# The builder image will be used to uncompress the tar.gz file with the Java Runtime.
2525

@@ -28,8 +28,8 @@ FROM oraclelinux:7-slim as builder
2828
LABEL maintainer="Aurelio Garcia-Ribeyro <aurelio.garciaribeyro@oracle.com>"
2929

3030
RUN yum install -y gzip tar
31-
32-
31+
32+
3333
# Default to UTF-8 file.encoding
3434
ENV LANG en_US.UTF-8
3535

@@ -43,48 +43,48 @@ ENV JAVA_HOME=/usr/java/jdk-11
4343
COPY *.tar.gz /tmp/
4444
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
4545
RUN set -eux; \
46-
ARCH="$(uname -m)" && \
46+
ARCH="$(uname -m)" && \
4747
if [ "$ARCH" = "x86_64" ]; \
4848
then \
49-
mv "$(ls /tmp/jdk-11*_linux-x64_bin.tar.gz)" /tmp/jdk.tar.gz ; \
49+
mv "$(ls /tmp/jdk-11*_linux-x64_bin.tar.gz)" /tmp/jdk.tar.gz ; \
5050
JAVA_SHA256=d22d0fcca761861a1eb2f5f6eb116c933354e8b1f76b3cda189c722cc0177c98 ; \
5151
else \
52-
mv "$(ls /tmp/jdk-11*_linux-aarch64_bin.tar.gz)" /tmp/jdk.tar.gz ; \
53-
JAVA_SHA256=3fc0d93f6363d32723c293ba5a9016e8ab27410351ed804020cfe71e87d3bc0a ; \
52+
mv "$(ls /tmp/jdk-11*_linux-aarch64_bin.tar.gz)" /tmp/jdk.tar.gz ; \
53+
JAVA_SHA256=3fc0d93f6363d32723c293ba5a9016e8ab27410351ed804020cfe71e87d3bc0a ; \
5454
fi && \
55-
echo "$JAVA_SHA256 */tmp/jdk.tar.gz" | sha256sum -c -; \
56-
mkdir -p "$JAVA_HOME"; \
57-
tar --extract --file /tmp/jdk.tar.gz --directory "$JAVA_HOME" --strip-components 1
58-
59-
## Get a fresh version of SLIM for the final image
55+
echo "$JAVA_SHA256 */tmp/jdk.tar.gz" | sha256sum -c -; \
56+
mkdir -p "$JAVA_HOME"; \
57+
tar --extract --file /tmp/jdk.tar.gz --directory "$JAVA_HOME" --strip-components 1
58+
59+
## Get a fresh version of SLIM for the final image
6060
FROM oraclelinux:7-slim
6161

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

6565
ENV JAVA_HOME=/usr/java/jdk-11
6666

67-
ENV PATH $JAVA_HOME/bin:$PATH
67+
ENV PATH $JAVA_HOME/bin:$PATH
6868

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

7272
RUN set -eux; \
7373
# Update the base image
74-
yum -y update; \
75-
yum install -y \
76-
# JDK assumes freetype is available
77-
freetype fontconfig \
78-
; \
79-
rm -rf /var/cache/yum; \
80-
ln -sfT "$JAVA_HOME" /usr/java/default; \
81-
ln -sfT "$JAVA_HOME" /usr/java/latest; \
82-
for bin in "$JAVA_HOME/bin/"*; do \
83-
base="$(basename "$bin")"; \
84-
[ ! -e "/usr/bin/$base" ]; \
85-
alternatives --install "/usr/bin/$base" "$base" "$bin" 20000; \
86-
done; \
87-
# -Xshare:dump will create a CDS archive to improve startup in subsequent runs
88-
java -Xshare:dump;
74+
yum -y update; \
75+
yum install -y \
76+
# JDK assumes freetype is available
77+
freetype fontconfig \
78+
; \
79+
rm -rf /var/cache/yum; \
80+
ln -sfT "$JAVA_HOME" /usr/java/default; \
81+
ln -sfT "$JAVA_HOME" /usr/java/latest; \
82+
for bin in "$JAVA_HOME/bin/"*; do \
83+
base="$(basename "$bin")"; \
84+
[ ! -e "/usr/bin/$base" ]; \
85+
alternatives --install "/usr/bin/$base" "$base" "$bin" 20000; \
86+
done; \
87+
# -Xshare:dump will create a CDS archive to improve startup in subsequent runs
88+
java -Xshare:dump;
8989

9090
CMD ["jshell"]

OracleJava/11/Dockerfile.ol8

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# $ docker build -t oracle/jdk:11 .
2020
#
2121
# This command is already scripted in build.sh so you can alternatively run
22-
# $ bash build.sh 8
22+
# $ bash build.sh 8
2323
#
2424
# The builder image will be used to uncompress the tar.gz file with the Java Runtime.
2525

@@ -42,18 +42,18 @@ ENV JAVA_HOME=/usr/java/jdk-11
4242
COPY *.tar.gz /tmp/
4343
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
4444
RUN set -eux; \
45-
ARCH="$(uname -m)" && \
45+
ARCH="$(uname -m)" && \
4646
if [ "$ARCH" = "x86_64" ]; \
4747
then \
48-
mv "$(ls /tmp/jdk-11*_linux-x64_bin.tar.gz)" /tmp/jdk.tar.gz ; \
48+
mv "$(ls /tmp/jdk-11*_linux-x64_bin.tar.gz)" /tmp/jdk.tar.gz ; \
4949
JAVA_SHA256=d22d0fcca761861a1eb2f5f6eb116c933354e8b1f76b3cda189c722cc0177c98 ; \
5050
else \
51-
mv "$(ls /tmp/jdk-11*_linux-aarch64_bin.tar.gz)" /tmp/jdk.tar.gz ; \
52-
JAVA_SHA256=3fc0d93f6363d32723c293ba5a9016e8ab27410351ed804020cfe71e87d3bc0a ; \
51+
mv "$(ls /tmp/jdk-11*_linux-aarch64_bin.tar.gz)" /tmp/jdk.tar.gz ; \
52+
JAVA_SHA256=3fc0d93f6363d32723c293ba5a9016e8ab27410351ed804020cfe71e87d3bc0a ; \
5353
fi && \
54-
echo "$JAVA_SHA256 */tmp/jdk.tar.gz" | sha256sum -c -; \
55-
mkdir -p "$JAVA_HOME"; \
56-
tar --extract --file /tmp/jdk.tar.gz --directory "$JAVA_HOME" --strip-components 1
54+
echo "$JAVA_SHA256 */tmp/jdk.tar.gz" | sha256sum -c -; \
55+
mkdir -p "$JAVA_HOME"; \
56+
tar --extract --file /tmp/jdk.tar.gz --directory "$JAVA_HOME" --strip-components 1
5757

5858
## Get a fresh version of OL8 for the final image
5959
FROM oraclelinux:8
@@ -63,26 +63,26 @@ ENV LANG en_US.UTF-8
6363

6464
ENV JAVA_HOME=/usr/java/jdk-11
6565

66-
ENV PATH $JAVA_HOME/bin:$PATH
66+
ENV PATH $JAVA_HOME/bin:$PATH
6767

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

7171
RUN set -eux; \
72-
dnf -y update; \
73-
dnf install -y \
72+
dnf -y update; \
73+
dnf install -y \
7474
# JDK assumes freetype is available
75-
freetype fontconfig \
76-
; \
77-
rm -rf /var/cache/dnf; \
78-
ln -sfT "$JAVA_HOME" /usr/java/default; \
79-
ln -sfT "$JAVA_HOME" /usr/java/latest; \
80-
for bin in "$JAVA_HOME/bin/"*; do \
81-
base="$(basename "$bin")"; \
82-
[ ! -e "/usr/bin/$base" ]; \
83-
alternatives --install "/usr/bin/$base" "$base" "$bin" 20000; \
84-
done; \
75+
freetype fontconfig \
76+
; \
77+
rm -rf /var/cache/dnf; \
78+
ln -sfT "$JAVA_HOME" /usr/java/default; \
79+
ln -sfT "$JAVA_HOME" /usr/java/latest; \
80+
for bin in "$JAVA_HOME/bin/"*; do \
81+
base="$(basename "$bin")"; \
82+
[ ! -e "/usr/bin/$base" ]; \
83+
alternatives --install "/usr/bin/$base" "$base" "$bin" 20000; \
84+
done; \
8585
# -Xshare:dump will create a CDS archive to improve startup in subsequent runs
86-
java -Xshare:dump;
86+
java -Xshare:dump;
8787

8888
CMD ["jshell"]

OracleJava/11/build.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66

77
if test "$1" = "8"
88
then
9-
echo "Building Oracle JDK 11 on Oracle Linux 8"
10-
docker build --file Dockerfile.ol8 --tag oracle/jdk:11-ol8 .
9+
echo "Building Oracle JDK 11 on Oracle Linux 8"
10+
docker build --file Dockerfile.ol8 --tag oracle/jdk:11-ol8 .
1111
else
12-
echo "Building Oracle JDK 11 on Oracle Linux 7 slim"
13-
docker build --tag oracle/jdk:11-ol7 .
12+
echo "Building Oracle JDK 11 on Oracle Linux 7 slim"
13+
docker build --tag oracle/jdk:11-ol7 .
1414
fi

OracleJava/17/Dockerfile

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# $ docker build -t oracle/jdk:17 .
1919
#
2020
# This command is already scripted in build.sh so you can alternatively run
21-
# $ bash build.sh
21+
# $ bash build.sh
2222
#
2323
# The builder image will be used to uncompress the tar.gz file with the Java Runtime.
2424

@@ -41,26 +41,26 @@ ENV JAVA_HOME=/usr/java/jdk-17
4141
COPY *.tar.gz /tmp/
4242
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
4343
RUN set -eux; \
44-
ARCH="$(uname -m)" && \
44+
ARCH="$(uname -m)" && \
4545
if [ "$ARCH" = "x86_64" ]; \
4646
then \
47-
mv "$(ls /tmp/jdk-17*_linux-x64_bin.tar.gz)" /tmp/jdk.tar.gz ; \
47+
mv "$(ls /tmp/jdk-17*_linux-x64_bin.tar.gz)" /tmp/jdk.tar.gz ; \
4848
JAVA_SHA256=f7a6fdebeb11840e1f5314bc330feb75b67e52491cf39073dbf3e51e3889ff08 ; \
4949
else \
50-
mv "$(ls /tmp/jdk-17*_linux-aarch64_bin.tar.gz)" /tmp/jdk.tar.gz ; \
51-
JAVA_SHA256=277e0010e7b17583e63827f9537a153ea79cb4b6ca28d523cd8a82f14a24a769 ; \
50+
mv "$(ls /tmp/jdk-17*_linux-aarch64_bin.tar.gz)" /tmp/jdk.tar.gz ; \
51+
JAVA_SHA256=277e0010e7b17583e63827f9537a153ea79cb4b6ca28d523cd8a82f14a24a769 ; \
5252
fi && \
53-
echo "$JAVA_SHA256 */tmp/jdk.tar.gz" | sha256sum -c -; \
54-
mkdir -p "$JAVA_HOME"; \
55-
tar --extract --file /tmp/jdk.tar.gz --directory "$JAVA_HOME" --strip-components 1
56-
57-
## Get a fresh version of OL8 for the final image
53+
echo "$JAVA_SHA256 */tmp/jdk.tar.gz" | sha256sum -c -; \
54+
mkdir -p "$JAVA_HOME"; \
55+
tar --extract --file /tmp/jdk.tar.gz --directory "$JAVA_HOME" --strip-components 1
56+
57+
## Get a fresh version of OL8 for the final image
5858
FROM oraclelinux:8
5959

6060
# Default to UTF-8 file.encoding
6161
ENV LANG en_US.UTF-8
62-
ENV JAVA_HOME=/usr/java/jdk-17
63-
ENV PATH $JAVA_HOME/bin:$PATH
62+
ENV JAVA_HOME=/usr/java/jdk-17
63+
ENV PATH $JAVA_HOME/bin:$PATH
6464

6565
# If you need the Java Version you can read it from the release file with
6666
# JAVA_VERSION=$(sed -n '/^JAVA_VERSION="/{s///;s/"//;p;}' "$JAVA_HOME"/release);
@@ -70,18 +70,18 @@ COPY --from=builder $JAVA_HOME $JAVA_HOME
7070

7171
RUN set -eux; \
7272
# Ensure we get the latest OL 8 updates available at build time
73-
dnf -y update; \
74-
# JDK assumes freetype is available
75-
dnf install -y \
76-
freetype fontconfig \
77-
; \
78-
rm -rf /var/cache/dnf; \
79-
ln -sfT "$JAVA_HOME" /usr/java/default; \
80-
ln -sfT "$JAVA_HOME" /usr/java/latest; \
81-
for bin in "$JAVA_HOME/bin/"*; do \
82-
base="$(basename "$bin")"; \
83-
[ ! -e "/usr/bin/$base" ]; \
84-
alternatives --install "/usr/bin/$base" "$base" "$bin" 20000; \
85-
done;
86-
73+
dnf -y update; \
74+
# JDK assumes freetype is available
75+
dnf install -y \
76+
freetype fontconfig \
77+
; \
78+
rm -rf /var/cache/dnf; \
79+
ln -sfT "$JAVA_HOME" /usr/java/default; \
80+
ln -sfT "$JAVA_HOME" /usr/java/latest; \
81+
for bin in "$JAVA_HOME/bin/"*; do \
82+
base="$(basename "$bin")"; \
83+
[ ! -e "/usr/bin/$base" ]; \
84+
alternatives --install "/usr/bin/$base" "$base" "$bin" 20000; \
85+
done;
86+
8787
CMD ["jshell"]

OracleJava/21/Dockerfile

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
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
12+
# https://download.oracle.com/java/21/latest/jdk-21_linux-<ARCH>_bin.tar.gz
1313
#
1414
# It will use either x64 or aarch64 depending on the target platform
1515
#
@@ -19,7 +19,7 @@
1919
# $ docker build -t oracle/jdk:21 .
2020
#
2121
# This command is already scripted in build.sh so you can alternatively run
22-
# $ bash build.sh
22+
# $ bash build.sh
2323
#
2424
# The builder image will be used to uncompress the tar.gz file with the Java Runtime.
2525

@@ -29,39 +29,39 @@ 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:8
3131
RUN set -eux; \
32-
dnf install -y tar;
33-
32+
dnf install -y tar;
33+
3434
# Default to UTF-8 file.encoding
3535
ENV 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+
4040
ENV JAVA_URL=https://download.oracle.com/java/21/latest \
41-
JAVA_HOME=/usr/java/jdk-21
41+
JAVA_HOME=/usr/java/jdk-21
4242

4343
##
4444
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
4545
RUN set -eux; \
46-
ARCH="$(uname -m)" && \
47-
# Java uses just x64 in the name of the tarball
46+
ARCH="$(uname -m)" && \
47+
# Java uses just x64 in the name of the tarball
4848
if [ "$ARCH" = "x86_64" ]; \
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) ; \
53-
curl --output /tmp/jdk.tgz "$JAVA_PKG" && \
54-
echo "$JAVA_SHA256" */tmp/jdk.tgz | sha256sum -c; \
55-
mkdir -p "$JAVA_HOME"; \
56-
tar --extract --file /tmp/jdk.tgz --directory "$JAVA_HOME" --strip-components 1
57-
58-
## Get a fresh version of OL8 for the final image
52+
JAVA_SHA256=$(curl "$JAVA_PKG".sha256) ; \
53+
curl --output /tmp/jdk.tgz "$JAVA_PKG" && \
54+
echo "$JAVA_SHA256" */tmp/jdk.tgz | sha256sum -c; \
55+
mkdir -p "$JAVA_HOME"; \
56+
tar --extract --file /tmp/jdk.tgz --directory "$JAVA_HOME" --strip-components 1
57+
58+
## Get a fresh version of OL8 for the final image
5959
FROM oraclelinux:8
6060

6161
# Default to UTF-8 file.encoding
6262
ENV LANG en_US.UTF-8
63-
ENV JAVA_HOME=/usr/java/jdk-21
64-
ENV PATH $JAVA_HOME/bin:$PATH
63+
ENV JAVA_HOME=/usr/java/jdk-21
64+
ENV PATH $JAVA_HOME/bin:$PATH
6565

6666
# 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);
@@ -71,18 +71,18 @@ COPY --from=builder $JAVA_HOME $JAVA_HOME
7171

7272
RUN set -eux; \
7373
# Ensure we get the latest OL 8 updates available at build time
74-
dnf -y update; \
75-
# JDK assumes freetype is available
76-
dnf install -y \
77-
freetype fontconfig \
78-
; \
79-
rm -rf /var/cache/dnf; \
80-
ln -sfT "$JAVA_HOME" /usr/java/default; \
81-
ln -sfT "$JAVA_HOME" /usr/java/latest; \
82-
for bin in "$JAVA_HOME/bin/"*; do \
83-
base="$(basename "$bin")"; \
84-
[ ! -e "/usr/bin/$base" ]; \
85-
alternatives --install "/usr/bin/$base" "$base" "$bin" 20000; \
86-
done;
87-
74+
dnf -y update; \
75+
# JDK assumes freetype is available
76+
dnf install -y \
77+
freetype fontconfig \
78+
; \
79+
rm -rf /var/cache/dnf; \
80+
ln -sfT "$JAVA_HOME" /usr/java/default; \
81+
ln -sfT "$JAVA_HOME" /usr/java/latest; \
82+
for bin in "$JAVA_HOME/bin/"*; do \
83+
base="$(basename "$bin")"; \
84+
[ ! -e "/usr/bin/$base" ]; \
85+
alternatives --install "/usr/bin/$base" "$base" "$bin" 20000; \
86+
done;
87+
8888
CMD ["jshell"]

0 commit comments

Comments
 (0)