Skip to content

Commit f9ba22d

Browse files
pstoecklenikolaik
authored andcommitted
chore(linter): fix hadolint warnings
1 parent 77ef968 commit f9ba22d

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

templates/alpine.Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
88
# Install node prereqs, nodejs and yarn
99
# Ref: https://raw.githubusercontent.com/nodejs/docker-node/master/Dockerfile-alpine.template
1010
# Ref: https://yarnpkg.com/en/docs/install
11-
RUN apk add curl
11+
RUN apk add --no-cache curl && rm /var/cache/apk/*
1212
# FIXME: no arm + musl build yet
1313
# Ref: https://github.com/nodejs/unofficial-builds/pull/59
1414
# Ref: https://github.com/nodejs/node/pull/45756
@@ -21,10 +21,11 @@ FROM python:{{ python_image }}
2121
LABEL org.opencontainers.image.authors="Nikolai R Kristiansen <nikolaik@gmail.com>"
2222

2323
RUN addgroup -g 1000 pn && adduser -u 1000 -G pn -s /bin/sh -D pn
24-
RUN apk add libstdc++
24+
RUN apk add --no-cache libstdc++ && rm /var/cache/apk/*
2525
COPY --from=builder /node-v{{ nodejs_canonical }}-linux-x64-musl /usr/local
26+
2627
RUN npm install -g corepack && corepack enable yarn
27-
RUN pip install -U pip pipenv uv
28+
RUN pip install --no-cache-dir -U pip pipenv uv
2829

2930
# Poetry
3031
# Mimic what https://install.python-poetry.org does without the flexibility (platforms, install sources, etc).

templates/debian.Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ RUN groupadd --gid 1000 pn && useradd --uid 1000 --gid pn --shell /bin/bash --cr
99
ENV POETRY_HOME=/usr/local
1010

1111
RUN \
12-
{% if distro_variant == "slim" %} apt-get update && apt-get install curl gnupg2 xz-utils -yqq && \
12+
{% if distro_variant == "slim" %} apt-get update && apt-get install --no-install-recommends curl gnupg2 xz-utils -yqq && \
1313
{% endif %} apt-get upgrade -yqq && \
1414
rm -rf /var/lib/apt/lists/*
1515
RUN NODE_VERSION="v{{ nodejs_canonical }}" \
@@ -32,5 +32,5 @@ RUN NODE_VERSION="v{{ nodejs_canonical }}" \
3232
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
3333
RUN npm install -g corepack && corepack enable yarn
3434

35-
RUN pip install -U pip pipenv uv && \
35+
RUN pip install --no-cache-dir -U pip pipenv uv && \
3636
curl -fsSL --compressed https://install.python-poetry.org | python -

0 commit comments

Comments
 (0)