You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
405 B
Docker
15 lines
405 B
Docker
# build stage
|
|
# node:14.18.0-alpine is lts-alpine as of 10/12/2021
|
|
FROM node:14.18.0-alpine as build-stage
|
|
WORKDIR /app
|
|
COPY package*.json ./
|
|
RUN npm install
|
|
COPY . .
|
|
RUN npm run build
|
|
|
|
# production stage
|
|
# nginx:1.20.1-alpine is nginx-stable as of 10/12/2021
|
|
FROM nginx:1.20.1-alpine as production-stage
|
|
COPY --from=build-stage /app/dist /usr/share/nginx/html
|
|
EXPOSE 80
|
|
CMD ["nginx", "-g", "daemon off;"] |