Created
August 16, 2019 22:30
-
-
Save houstondapaz/401f377fa9a8437335c1da70f71d7951 to your computer and use it in GitHub Desktop.
Example of multi stage build for vue
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
# build stage | |
FROM node:9.11.1-alpine as build-stage | |
WORKDIR /app | |
COPY package*.json ./ | |
RUN npm install | |
COPY . . | |
RUN npm run build | |
# production stage | |
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