Skip to content

Instantly share code, notes, and snippets.

@phillies
Created June 4, 2019 03:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phillies/1fd11d1db1edfe7076c17f421a81ac67 to your computer and use it in GitHub Desktop.
Save phillies/1fd11d1db1edfe7076c17f421a81ac67 to your computer and use it in GitHub Desktop.
Multi-stage build example for creating a vue app running on nginx web server
FROM node as builder
RUN git clone https://github.com/phillies/vue_example.git /opt/vue_example
WORKDIR /opt/vue_example
RUN npm install && npm run build
FROM nginx
COPY --from=builder /opt/vue_example/dist/ /usr/share/nginx/html/
EXPOSE 80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment