Created
April 30, 2019 21:13
-
-
Save matthewoestreich/c0a992453b7ddc09bc864d810b28b105 to your computer and use it in GitHub Desktop.
Example Dockerfile for Vue.js and NGINX
This file contains hidden or 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:lts-alpine AS build-stage | |
WORKDIR /app | |
COPY package*.json ./ | |
RUN npm install | |
COPY . . | |
RUN npm run build | |
# production stage | |
# - this line was throwing errors, something is up with Jenkins Docker plugin - | |
# FROM nginx:stable-alpine as production-stage | |
FROM nginx:stable-alpine | |
COPY --from=build-stage /app/docs /usr/share/nginx/html | |
EXPOSE 80:1337 | |
CMD ["nginx", "-g", "daemon off;"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment