Skip to content

Commit 9a1f878

Browse files
committed
Fix: merge consecutive RUN instructions in frontend Dockerfile
1 parent 50115b0 commit 9a1f878

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

docker/frontend/Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ WORKDIR /app
4949
ENV NEXT_TELEMETRY_DISABLED=1
5050
ENV NODE_ENV=production
5151

52-
# Fix CVE-2026-23745: Update npm's bundled tar to 7.5.3 in runner stage
52+
# Fix CVE-2026-23745: Update npm's bundled tar to 7.5.4 in runner stage
5353
# Note: Must download tar with npm pack BEFORE removing the old tar (npm needs it)
5454
RUN cd /tmp && \
5555
npm pack tar@7.5.7 && \
@@ -59,9 +59,8 @@ RUN cd /tmp && \
5959
cp -r package "${TAR_DIR}" && \
6060
chmod -R 755 "${TAR_DIR}" && \
6161
rm -rf package tar-7.5.7.tgz && \
62-
grep -q 'version.*7.5.7' "${TAR_DIR}/package.json"
63-
64-
RUN addgroup --system --gid 1001 nodejs && \
62+
grep -q 'version.*7.5.7' "${TAR_DIR}/package.json" && \
63+
addgroup --system --gid 1001 nodejs && \
6564
adduser --system --uid 1001 -G nodejs nextjs
6665
# Copying files with root as owner, so that executing user cannot change the container.
6766
COPY --from=builder --chown=root:root --chmod=555 /app/public public

0 commit comments

Comments
 (0)