Skip to content

Instantly share code, notes, and snippets.

@codyde
Created April 18, 2019 22:11
Show Gist options
  • Save codyde/576fd5e8f7f889f80dfb40e062ea5782 to your computer and use it in GitHub Desktop.
Save codyde/576fd5e8f7f889f80dfb40e062ea5782 to your computer and use it in GitHub Desktop.
### 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