Skip to content

Commit 709532d

Browse files
committed
⚡️ Update nginx version and enhance Dockerfile
1 parent e6ea48c commit 709532d

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Dockerfile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,20 @@ RUN yarn install --frozen-lockfile
1414
RUN yarn run build
1515

1616
# Second stage is to build the application image
17-
FROM nginx:1.23-alpine as application
17+
FROM nginx:1.25-alpine as application
1818

1919
WORKDIR /usr/share/nginx/html
2020

2121
# Copy the build files from the first stage
2222
COPY --from=build /app/build ./
2323

24+
RUN chown -R nginx:nginx /var/cache/nginx && \
25+
chown -R nginx:nginx /var/log/nginx && \
26+
chown -R nginx:nginx /etc/nginx/conf.d
27+
RUN touch /var/run/nginx.pid && \
28+
chown -R nginx:nginx /var/run/nginx.pid
29+
30+
USER nginx:nginx
31+
2432
# By default, nginx expose port 80
2533
# EXPOSE 80

0 commit comments

Comments
 (0)