From ee0f8116ce2c3c5143cda2b7b51d244e20b53183 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikolai=20R=C3=B8ed=20Kristiansen?= Date: Mon, 27 Oct 2025 11:59:34 +0100 Subject: [PATCH] fix: No need to rm cache dir with apk --no-cache Ref: https://github.com/hadolint/hadolint/wiki/DL3019 --- templates/alpine.Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/alpine.Dockerfile b/templates/alpine.Dockerfile index 2bada5c..5dcd8a7 100644 --- a/templates/alpine.Dockerfile +++ b/templates/alpine.Dockerfile @@ -8,7 +8,7 @@ SHELL ["/bin/ash", "-eo", "pipefail", "-c"] # Install node prereqs, nodejs and yarn # Ref: https://raw.githubusercontent.com/nodejs/docker-node/master/Dockerfile-alpine.template # Ref: https://yarnpkg.com/en/docs/install -RUN apk add --no-cache curl && rm /var/cache/apk/* +RUN apk add --no-cache curl # FIXME: no arm + musl build yet # Ref: https://github.com/nodejs/unofficial-builds/pull/59 # Ref: https://github.com/nodejs/node/pull/45756 @@ -21,7 +21,7 @@ FROM python:{{ python_image }} LABEL org.opencontainers.image.authors="Nikolai R Kristiansen " RUN addgroup -g 1000 pn && adduser -u 1000 -G pn -s /bin/sh -D pn -RUN apk add --no-cache libstdc++ && rm /var/cache/apk/* +RUN apk add --no-cache libstdc++ COPY --from=builder /node-v{{ nodejs_canonical }}-linux-x64-musl /usr/local RUN npm install -g corepack && corepack enable yarn