Skip to content

Instantly share code, notes, and snippets.

@emiraldo
Last active April 12, 2020 02:56
Show Gist options
  • Save emiraldo/d15f803a2142928c7d1c4d3d9007f19c to your computer and use it in GitHub Desktop.
Save emiraldo/d15f803a2142928c7d1c4d3d9007f19c to your computer and use it in GitHub Desktop.
Ejemplo Dockerfile multistage
# 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