Update Dockerfile with apk upgrade and vulnerabilities fixes
This commit is contained in:
@@ -1,5 +1,9 @@
|
|||||||
# Build stage
|
# Build stage
|
||||||
FROM node:22-alpine AS build
|
FROM node:22-alpine AS build
|
||||||
|
|
||||||
|
# Update packages for security
|
||||||
|
RUN apk update && apk upgrade --no-cache
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
RUN npm install --frozen-lockfile || npm install
|
RUN npm install --frozen-lockfile || npm install
|
||||||
@@ -8,6 +12,10 @@ RUN npm run build
|
|||||||
|
|
||||||
# Production stage
|
# Production stage
|
||||||
FROM nginx:alpine
|
FROM nginx:alpine
|
||||||
|
|
||||||
|
# Update packages for security
|
||||||
|
RUN apk update && apk upgrade --no-cache
|
||||||
|
|
||||||
COPY --from=build /app/dist /usr/share/nginx/html
|
COPY --from=build /app/dist /usr/share/nginx/html
|
||||||
# Nginx default listen 80
|
# Nginx default listen 80
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|||||||
Reference in New Issue
Block a user