Skip to content

Commit d37bce2

Browse files
committed
Sync Dockerfiles
1 parent 53b33d5 commit d37bce2

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

demo/integration-tests/tci-webapp-rest/Dockerfile

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,20 @@ ARG JAVA_VERSION=21
44
FROM eclipse-temurin:${JAVA_VERSION}-jre-alpine AS jre-base
55

66

7+
# Force upgrade to get rid of CVEs
8+
# See also https://stackoverflow.com/a/76440791
9+
FROM alpine:3 AS alpine-upgraded
10+
11+
RUN apk upgrade --no-cache
12+
13+
714
# Build the JRE ourself and exclude stuff from Eclipse-Temurin that we don't need
815
#
916
# Derived from https://github.com/adoptium/containers/blob/91ea190c462741d2c64ed2f8f0a0efdb3e77c49d/21/jre/alpine/3.21/Dockerfile
10-
FROM alpine:3 AS jre-minimized
17+
FROM scratch AS jre-minimized
18+
19+
COPY --from=alpine-upgraded / /
20+
CMD ["/bin/sh"]
1121

1222
ENV JAVA_HOME=/opt/java/openjdk
1323
ENV PATH=$JAVA_HOME/bin:$PATH

demo/integration-tests/tci-webapp-vaadin/Dockerfile

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,20 @@ ARG JAVA_VERSION=21
44
FROM eclipse-temurin:${JAVA_VERSION}-jre-alpine AS jre-base
55

66

7+
# Force upgrade to get rid of CVEs
8+
# See also https://stackoverflow.com/a/76440791
9+
FROM alpine:3 AS alpine-upgraded
10+
11+
RUN apk upgrade --no-cache
12+
13+
714
# Build the JRE ourself and exclude stuff from Eclipse-Temurin that we don't need
815
#
916
# Derived from https://github.com/adoptium/containers/blob/91ea190c462741d2c64ed2f8f0a0efdb3e77c49d/21/jre/alpine/3.21/Dockerfile
10-
FROM alpine:3 AS jre-minimized
17+
FROM scratch AS jre-minimized
18+
19+
COPY --from=alpine-upgraded / /
20+
CMD ["/bin/sh"]
1121

1222
ENV JAVA_HOME=/opt/java/openjdk
1323
ENV PATH=$JAVA_HOME/bin:$PATH

0 commit comments

Comments
 (0)