Files
rowy/Dockerfile
2020-06-09 17:37:13 +08:00

13 lines
290 B
Docker

# Stage 1
FROM node:8 as react-build
WORKDIR /www
COPY . ./
RUN yarn
RUN yarn build
# Stage 2 - the production environment
FROM nginx:alpine
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=react-build /app/build /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]