Skip to content

Instantly share code, notes, and snippets.

@houstondapaz
Created August 16, 2019 22:30
Show Gist options
  • Save houstondapaz/401f377fa9a8437335c1da70f71d7951 to your computer and use it in GitHub Desktop.
Save houstondapaz/401f377fa9a8437335c1da70f71d7951 to your computer and use it in GitHub Desktop.
Example of multi stage build for vue
# 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