From dce2daef855bfeb7a95e6f2a5cb415c82356eae0 Mon Sep 17 00:00:00 2001 From: Giovanni Toraldo Date: Fri, 18 Feb 2022 10:37:48 +0100 Subject: [PATCH 1/3] make sure alpine base is updated --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 311b6bc..abecc05 100644 --- a/Dockerfile +++ b/Dockerfile @@ -70,7 +70,9 @@ ENV JAVA_HOME=/usr/lib/jvm/java-${JAVA_MAJOR}-openjdk ENV LANG C.UTF-8 ENV LC_ALL C.UTF-8 -RUN apk add openjdk${JAVA_MAJOR}-${JDIST}-headless +RUN apk update && \ + apk upgrade && \ + apk add openjdk${JAVA_MAJOR}-${JDIST}-headless FROM ${DISTRIB_NAME}${DISTRIB_MAJOR} AS JAVA_BASE_IMAGE ARG DISTRIB_NAME From 031c32d12ab486606a782be038a1242061409502 Mon Sep 17 00:00:00 2001 From: Giovanni Toraldo Date: Fri, 18 Feb 2022 12:13:40 +0100 Subject: [PATCH 2/3] Use semver for alpine image --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index abecc05..9e64637 100644 --- a/Dockerfile +++ b/Dockerfile @@ -61,7 +61,7 @@ RUN yum update -y && \ JAVA_BIN_PATH=$(rpm -ql java-${JAVA_PKG_VERSION}-openjdk-${PKG_DEVEL:-headless} | grep '\/bin\/java$') && \ test -L $JAVA_HOME || ln -sf ${JAVA_BIN_PATH%*/bin/java} $JAVA_HOME -FROM alpine:3.15@sha256:21a3deaa0d32a8057914f36584b5288d2e5ecc984380bc0118285c70fa8c9300 AS alpine3.15 +FROM alpine:3.15.0 AS alpine3.15 ARG JDIST ARG JAVA_MAJOR From e5505b7911fa6731194a900a97ad17dcca25be3e Mon Sep 17 00:00:00 2001 From: Giovanni Toraldo Date: Fri, 18 Feb 2022 14:10:58 +0100 Subject: [PATCH 3/3] cleanup index at the end --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 9e64637..9d4415c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -72,7 +72,8 @@ ENV LC_ALL C.UTF-8 RUN apk update && \ apk upgrade && \ - apk add openjdk${JAVA_MAJOR}-${JDIST}-headless + apk add openjdk${JAVA_MAJOR}-${JDIST}-headless && \ + rm -rf /var/cache/apk/* FROM ${DISTRIB_NAME}${DISTRIB_MAJOR} AS JAVA_BASE_IMAGE ARG DISTRIB_NAME