You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
477 B
19 lines
477 B
x
|
|
# stage1 as builder
|
|
FROM node:16-alpine as builder
|
|
# Copy the package.json and install dependencies
|
|
COPY package*.json ./
|
|
RUN npm install
|
|
# Copy rest of the files
|
|
COPY . .
|
|
# Build the project
|
|
RUN npm run build
|
|
|
|
|
|
FROM nginx:alpine as production-build
|
|
COPY nginx.conf /etc/nginx/nginx.conf
|
|
## Remove default nginx index page
|
|
RUN rm -rf /usr/share/nginx/html/*
|
|
# Copy from the stage 1
|
|
COPY --from=builder /dist /usr/share/nginx/html/nested-app
|
|
CMD ["nginx", "-g", "daemon off;"] |