Skip to content

Instantly share code, notes, and snippets.

@devbyray
Created February 14, 2020 15:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save devbyray/798a61085e705ad3011356b2c71472c3 to your computer and use it in GitHub Desktop.
Save devbyray/798a61085e705ad3011356b2c71472c3 to your computer and use it in GitHub Desktop.
Example Dockerimage for Angular 9.0
FROM node:13.3.0 AS compile-image
RUN npm install -g yarn
WORKDIR /opt/ng
COPY .npmrc package.json yarn.lock ./
RUN yarn install
ENV PATH="./node_modules/.bin:$PATH"
COPY . ./
RUN ng build --prod
FROM nginx
COPY docker/nginx/default.conf /etc/nginx/conf.d/default.conf
COPY --from=compile-image /opt/ng/dist/app-name /usr/share/nginx/html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment