Skip to content

Instantly share code, notes, and snippets.

@dmitribodiu
Forked from devbyray/Dockerimage
Created March 2, 2021 14:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmitribodiu/de76aff05b2c160ae30978dee02f86db to your computer and use it in GitHub Desktop.
Save dmitribodiu/de76aff05b2c160ae30978dee02f86db 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