Skip to content

Instantly share code, notes, and snippets.

@matthewoestreich
Created April 30, 2019 21:13
Show Gist options
  • Save matthewoestreich/c0a992453b7ddc09bc864d810b28b105 to your computer and use it in GitHub Desktop.
Save matthewoestreich/c0a992453b7ddc09bc864d810b28b105 to your computer and use it in GitHub Desktop.
Example Dockerfile for Vue.js and NGINX
# 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