40d9f11047
Change-Id: Id093976032f079c62efd9fcaaf0617e05ceef3b0
23 lines
353 B
Docker
23 lines
353 B
Docker
# Step 1: Build Stage
|
|
FROM node:16 as build-stage
|
|
|
|
WORKDIR /app
|
|
|
|
COPY package.json package-lock.json ./
|
|
|
|
RUN npm install
|
|
|
|
COPY . .
|
|
|
|
RUN npm run build
|
|
|
|
# Step 2: Nginx Stage
|
|
FROM docker.io/nginx:alpine
|
|
|
|
COPY --from=build-stage /app/dist /usr/share/nginx/html
|
|
COPY .env.production /usr/share/nginx/html/.env
|
|
|
|
EXPOSE 80
|
|
|
|
CMD ["nginx", "-g", "daemon off;"]
|