Files

17 lines
382 B
Docker
Raw Permalink Normal View History

2021-09-24 17:26:03 -06:00
FROM node:16-alpine as build-step
RUN mkdir /app
2021-09-23 14:01:02 -06:00
WORKDIR /app
2021-09-24 17:26:03 -06:00
ENV PATH /app/node_modules/.bin:$PATH
COPY package*.json /app
2021-09-23 14:01:02 -06:00
RUN npm install
2021-09-24 17:26:03 -06:00
COPY . /app
# USER node
RUN npm run build
FROM nginx:1-alpine
2021-09-25 12:58:34 -06:00
COPY --from=build-step /app/build /usr/share/nginx/html
RUN rm /etc/nginx/conf.d/default.conf
COPY nginx/nginx.conf /etc/nginx/conf.d
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]