Skip to content

Instantly share code, notes, and snippets.

@phillies
Created June 4, 2019 03:31
Show Gist options
  • Select an option

  • Save phillies/1fd11d1db1edfe7076c17f421a81ac67 to your computer and use it in GitHub Desktop.

Select an option

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