From 1560fad8c14c7f861486dbf4af4de0255e20ad84 Mon Sep 17 00:00:00 2001 From: Patrick Stoeckle Date: Wed, 8 Oct 2025 23:18:17 +0200 Subject: [PATCH] chore(linter): fix hadolint warnings --- templates/alpine.Dockerfile | 7 ++++--- templates/debian.Dockerfile | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/templates/alpine.Dockerfile b/templates/alpine.Dockerfile index 4375eb3..2bada5c 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 curl +RUN apk add --no-cache curl && rm /var/cache/apk/* # FIXME: no arm + musl build yet # Ref: https://github.com/nodejs/unofficial-builds/pull/59 # Ref: https://github.com/nodejs/node/pull/45756 @@ -21,10 +21,11 @@ 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 libstdc++ +RUN apk add --no-cache libstdc++ && rm /var/cache/apk/* COPY --from=builder /node-v{{ nodejs_canonical }}-linux-x64-musl /usr/local + RUN npm install -g corepack && corepack enable yarn -RUN pip install -U pip pipenv uv +RUN pip install --no-cache-dir -U pip pipenv uv # Poetry # Mimic what https://install.python-poetry.org does without the flexibility (platforms, install sources, etc). diff --git a/templates/debian.Dockerfile b/templates/debian.Dockerfile index d7b6f27..bbdf3c1 100644 --- a/templates/debian.Dockerfile +++ b/templates/debian.Dockerfile @@ -9,7 +9,7 @@ RUN groupadd --gid 1000 pn && useradd --uid 1000 --gid pn --shell /bin/bash --cr ENV POETRY_HOME=/usr/local RUN \ -{% if distro_variant == "slim" %} apt-get update && apt-get install curl gnupg2 xz-utils -yqq && \ +{% if distro_variant == "slim" %} apt-get update && apt-get install --no-install-recommends curl gnupg2 xz-utils -yqq && \ {% endif %} apt-get upgrade -yqq && \ rm -rf /var/lib/apt/lists/* RUN NODE_VERSION="v{{ nodejs_canonical }}" \ @@ -32,5 +32,5 @@ RUN NODE_VERSION="v{{ nodejs_canonical }}" \ && ln -s /usr/local/bin/node /usr/local/bin/nodejs RUN npm install -g corepack && corepack enable yarn -RUN pip install -U pip pipenv uv && \ +RUN pip install --no-cache-dir -U pip pipenv uv && \ curl -fsSL --compressed https://install.python-poetry.org | python -