Sign inSign up

vincenthome/dockerize-ng-nginx

By vincenthome

•Updated over 7 years ago

Angular in Docker with Nginx, supporting configurations / environments

Image
0

102

vincenthome/dockerize-ng-nginx repository overview

⁠Angular in Docker with Nginx, supporting configurations / environments, built with multi-stage Docker builds

https://github.com/vincenthome/dockerize-ng-nginx⁠

⁠Dockerfile

# Stage 0, "build-stage", based on Node.js, to build and compile the frontend
FROM tiangolo/node-frontend:10 as build-stage

WORKDIR /app

COPY package*.json /app/

RUN npm install

COPY ./ /app/

ARG configuration=production

RUN npm run build -- --output-path=./dist/out --configuration $configuration


# Stage 1, based on Nginx, to have only the compiled app, ready for production with Nginx
FROM nginx:1.15

COPY --from=build-stage /app/dist/out/ /usr/share/nginx/html

# Copy the default nginx.conf provided by tiangolo/node-frontend
COPY --from=build-stage /nginx.conf /etc/nginx/conf.d/default.conf

Tag summary

Content type

Image

Digest

Size

45.8 MB

Last updated

over 7 years ago

docker pull vincenthome/dockerize-ng-nginx:dev