Skip to content
Switch branches/tags
Go to file
Cannot retrieve contributors at this time
# Step 1: Build angular application
FROM node:12-alpine AS base
# switch to new workdir
# set unsafe permissions
RUN npm config set unsafe-perm true
# copy all files
COPY . .
# install dependencies
RUN npm install
# build application
RUN npm run build
# Step 2: Copy built artifact and serve app with nginx
FROM nginx:stable-alpine
LABEL version="1.0"
# copy nginx config file
COPY nginx.conf /etc/nginx/nginx.conf
# Copy build version of the application to nginx folder
WORKDIR /usr/share/nginx/html
# replace path for your application
COPY --from=base /app/dist/artslabDemo/ .
# expose port 80 and run nginx
CMD ["nginx", "-g", "daemon off;"]