Skip to content

Instantly share code, notes, and snippets.

@codyde codyde/Dockerfile
Created Apr 18, 2019

Embed
What would you like to do?
### STAGE 1: Build ###
FROM node:10.10-alpine as builder
COPY package.json package-lock.json ./
RUN npm i && mkdir /ng-app && cp -R ./node_modules ./ng-app
WORKDIR /ng-app
COPY . .
RUN $(npm bin)/ng build --prod
### STAGE 2: Setup ###
FROM nginx:1.14-alpine
COPY nginx/default.conf /etc/nginx/conf.d/
RUN rm -rf /usr/share/nginx/html/*
COPY --from=builder /ng-app/dist/cmbu-bootcamp-app /usr/share/nginx/html
CMD ["nginx", "-g", "daemon off;"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.