tmp
Browse files- Dockerfile +7 -1
Dockerfile
CHANGED
@@ -20,8 +20,14 @@ RUN npm run build
|
|
20 |
# Use an official Nginx runtime as the base image for serving the application
|
21 |
FROM nginx:alpine
|
22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
# Copy the built application from the build stage
|
24 |
-
COPY --from=build /app/dist /usr/share/nginx/html
|
25 |
|
26 |
# Expose the port the app runs on
|
27 |
EXPOSE 80
|
|
|
20 |
# Use an official Nginx runtime as the base image for serving the application
|
21 |
FROM nginx:alpine
|
22 |
|
23 |
+
# Set up a new user named "user" with user ID 1000
|
24 |
+
RUN addgroup -S user && adduser -S user -G user
|
25 |
+
|
26 |
+
# Switch to the "user" user
|
27 |
+
USER user
|
28 |
+
|
29 |
# Copy the built application from the build stage
|
30 |
+
COPY --chown=user --from=build /app/dist /usr/share/nginx/html
|
31 |
|
32 |
# Expose the port the app runs on
|
33 |
EXPOSE 80
|