Skip to content

Instantly share code, notes, and snippets.

Last active April 28, 2020 18:25
What would you like to do?
Vue app production dockerfile
# use node alpine
FROM node:13.11.0-alpine as builder
# set the working directory in the container
# COPY the package json and package json lock files
COPY package*.json ./
# perform npm install
RUN npm install
# copy all files to the work directory
COPY . .
# run the command
RUN npm run build-prod
FROM nginx
# expose the port
# copy nginx config
COPY ./nginx/default.conf /etc/nginx/conf.d/default.conf
COPY --from=builder /app/dist /usr/share/nginx/html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment