Skip to content

Commit 2844bb1

Browse files
roujalunika
authored andcommitted
🔒️(front) improve docker image security
Cyberwatch reported security issues with the frontend Docker image.
1 parent 3f2d84b commit 2844bb1

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

src/frontend/Dockerfile

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -50,19 +50,7 @@ ENV NEXT_PUBLIC_PUBLISH_AS_MIT=${PUBLISH_AS_MIT}
5050
RUN yarn build
5151

5252
# ---- Front-end image ----
53-
FROM nginxinc/nginx-unprivileged:1.27-alpine AS frontend-production
54-
55-
# Remove the upgrade part once nginx has published
56-
# a new image that fixes the CVE related to libxml2
57-
ARG UID=101
58-
USER root
59-
60-
# Upgrade system packages to install security updates
61-
RUN apk update && \
62-
apk upgrade && \
63-
rm -rf /var/cache/apk/*
64-
65-
USER $UID
53+
FROM nginxinc/nginx-unprivileged:alpine3.21 AS frontend-production
6654

6755
# Un-privileged user running the application
6856
ARG DOCKER_USER

0 commit comments

Comments
 (0)