Dockerfile
# Stage 0, based on Node.js, to build and compile Angular
FROM node:8.11 as node
WORKDIR /app
COPY package.json /app/
RUN npm install
RUN npm install -g @angular/cli
COPY ./ /app/
RUN ng build --prod
# Stage 1, based on Nginx, to have only the compiled app, ready for production with Nginx
FROM nginx:1.13
RUN rm -rf /usr/share/nginx/html/
COPY --from=node /app/dist/angular.io-example/ /usr/share/nginx/html
COPY ./nginx-custom.conf /etc/nginx/conf.d/default.conf
docker run -d -p 8081:80 keehyun2/angular6:1.0
Content type
Image
Digest
Size
42.6 MB
Last updated
over 8 years ago
docker pull keehyun2/angular6:1.1