Last active
April 12, 2020 02:56
-
-
Save emiraldo/d15f803a2142928c7d1c4d3d9007f19c to your computer and use it in GitHub Desktop.
Ejemplo Dockerfile multistage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# etapa de compilación | |
FROM node:9.11.1-alpine as build-stage | |
WORKDIR /app | |
COPY package*.json ./ | |
RUN npm install | |
COPY . . | |
RUN npm run build | |
# etapa de producción | |
FROM nginx:1.13.12-alpine as production-stage | |
COPY --from=build-stage /app/dist /usr/share/nginx/html | |
EXPOSE 80 | |
CMD ["nginx", "-g", "daemon off;"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment