Skip to content

Commit bae017e

Browse files
Migrate GraalVM 8 and 11 images to Ubuntu Noble
Images are now based off of Ubuntu Noble instead of GraalVM's Oracle Linux builds.
1 parent 95f0750 commit bae017e

File tree

2 files changed

+76
-12
lines changed

2 files changed

+76
-12
lines changed

java/11/graalvm/Dockerfile

+38-6
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,53 @@
1-
FROM --platform=$TARGETOS/$TARGETARCH ghcr.io/graalvm/graalvm-ce:java11
1+
FROM --platform=$TARGETOS/$TARGETARCH ubuntu:noble
22

33
LABEL author="Garrett Summerfield" maintainer="[email protected]"
44

55
LABEL org.opencontainers.image.source="https://github.com/PizzabyteLLC/images"
66
LABEL org.opencontainers.image.licenses=MIT
77

8-
RUN microdnf update \
9-
&& microdnf install -y curl ca-certificates openssl git tar sqlite fontconfig tzdata iproute gcc gcc-c++ freetype libstdc++ lsof glibc-locale-source glibc-langpack-en \
10-
&& microdnf clean all
8+
ARG TARGETPLATFORM
9+
ARG GRAAL_VERSION=22.3.3
10+
ARG JAVA_VERSION=11
11+
12+
RUN apt update \
13+
&& apt install -y \
14+
curl \
15+
lsof \
16+
ca-certificates \
17+
openssl \
18+
git \
19+
tar \
20+
sqlite3 \
21+
fontconfig \
22+
tzdata \
23+
iproute2 \
24+
libfreetype6 \
25+
tini \
26+
zip \
27+
unzip \
28+
libstdc++6
29+
30+
RUN case ${TARGETPLATFORM} in \
31+
"linux/amd64") ARCH=amd64 ;; \
32+
"linux/arm64") ARCH=aarch64 ;; \
33+
esac \
34+
&& curl --retry 3 -Lfso /tmp/graalvm.tar.gz https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-${GRAAL_VERSION}/graalvm-ce-java${JAVA_VERSION}-linux-${ARCH}-${GRAAL_VERSION}.tar.gz \
35+
&& mkdir -p /opt/java/graalvm \
36+
&& cd /opt/java/graalvm \
37+
&& tar -xf /tmp/graalvm.tar.gz --strip-components=1 \
38+
&& export PATH="/opt/java/graalvm/bin:$PATH" \
39+
&& rm -rf /var/lib/apt/lists/* \
40+
&& rm -rf /tmp/graalvm.tar.gz
1141

1242
## Setup user and working directory
13-
RUN adduser --home-dir /home/container container
43+
RUN useradd -m -d /home/container container
1444
USER container
1545
ENV USER=container HOME=/home/container
1646
WORKDIR /home/container
1747

1848
STOPSIGNAL SIGINT
1949

2050
COPY --chown=container:container ./../../entrypoint.sh /entrypoint.sh
21-
CMD [ "/bin/bash", "/entrypoint.sh"]
51+
RUN chmod +x /entrypoint.sh
52+
ENTRYPOINT ["/usr/bin/tini", "-g", "--"]
53+
CMD ["/entrypoint.sh"]

java/8/graalvm/Dockerfile

+38-6
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,53 @@
1-
FROM --platform=$TARGETOS/$TARGETARCH ghcr.io/graalvm/graalvm-ce:java8
1+
FROM --platform=$TARGETOS/$TARGETARCH ubuntu:noble
22

33
LABEL author="Garrett Summerfield" maintainer="[email protected]"
44

55
LABEL org.opencontainers.image.source="https://github.com/PizzabyteLLC/images"
66
LABEL org.opencontainers.image.licenses=MIT
77

8-
RUN microdnf update \
9-
&& microdnf install -y curl ca-certificates openssl git tar sqlite fontconfig tzdata iproute gcc gcc-c++ freetype libstdc++ lsof glibc-locale-source glibc-langpack-en \
10-
&& microdnf clean all
8+
ARG TARGETPLATFORM
9+
ARG GRAAL_VERSION=21.2.0
10+
ARG JAVA_VERSION=8
11+
12+
RUN apt update \
13+
&& apt install -y \
14+
curl \
15+
lsof \
16+
ca-certificates \
17+
openssl \
18+
git \
19+
tar \
20+
sqlite3 \
21+
fontconfig \
22+
tzdata \
23+
iproute2 \
24+
libfreetype6 \
25+
tini \
26+
zip \
27+
unzip \
28+
libstdc++6
29+
30+
RUN case ${TARGETPLATFORM} in \
31+
"linux/amd64") ARCH=amd64 ;; \
32+
"linux/arm64") ARCH=aarch64 ;; \
33+
esac \
34+
&& curl --retry 3 -Lfso /tmp/graalvm.tar.gz https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-${GRAAL_VERSION}/graalvm-ce-java${JAVA_VERSION}-linux-${ARCH}-${GRAAL_VERSION}.tar.gz \
35+
&& mkdir -p /opt/java/graalvm \
36+
&& cd /opt/java/graalvm \
37+
&& tar -xf /tmp/graalvm.tar.gz --strip-components=1 \
38+
&& export PATH="/opt/java/graalvm/bin:$PATH" \
39+
&& rm -rf /var/lib/apt/lists/* \
40+
&& rm -rf /tmp/graalvm.tar.gz
1141

1242
## Setup user and working directory
13-
RUN adduser --home-dir /home/container container
43+
RUN useradd -m -d /home/container container
1444
USER container
1545
ENV USER=container HOME=/home/container
1646
WORKDIR /home/container
1747

1848
STOPSIGNAL SIGINT
1949

2050
COPY --chown=container:container ./../../entrypoint.sh /entrypoint.sh
21-
CMD [ "/bin/bash", "/entrypoint.sh"]
51+
RUN chmod +x /entrypoint.sh
52+
ENTRYPOINT ["/usr/bin/tini", "-g", "--"]
53+
CMD ["/entrypoint.sh"]

0 commit comments

Comments
 (0)