Skip to content

Commit 029c496

Browse files
lalunalalolagneum
authored andcommitted
chore(ce-ui): refresh Alpine packages in run stage to clear OS CVEs
1 parent bd64b06 commit 029c496

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

ui/packages/ce/Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ RUN apk add --no-cache --update git && \
2121
# Run phase.
2222
FROM nginx:1.29.7-alpine as run
2323

24+
# Pull latest Alpine package versions before adding application files.
25+
# Without this, the published image inherits whatever package versions were
26+
# baked into the nginx:1.29.7-alpine tag at the time it was built — which
27+
# accumulates CVEs (notably libcrypto3) until the upstream nginx tag is
28+
# refreshed. Apk upgrade pulls fixed versions from the Alpine stable feed.
29+
RUN apk update && apk upgrade --no-cache && rm -rf /var/cache/apk/*
30+
2431
COPY --from=build /app/packages/ce/build /srv/ce
2532
COPY ./ui/packages/ce/nginx.conf /etc/nginx/conf.d/ce.conf.template
2633
COPY ./ui/packages/ce/docker-entrypoint.sh /

0 commit comments

Comments
 (0)