20 lines
522 B
Docker

# angular build
FROM node:16.20.2-alpine3.18 as build
LABEL stage=app
LABEL build_id=$BUILD_ID
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install
COPY . ./
ENV NODE_OPTIONS="--max_old_space_size=4096"
RUN npm run build
# configuring nginx web-server
FROM nginx:1.17.1-alpine
#COPY --from=code /repo/cns-beta/springboot/angular-clarity-master/angular-clarity-master/default.conf /etc/nginx/conf.d/default.conf
COPY --from=build /usr/src/app/dist /usr/share/nginx/html
#RUN ls -a /usr/share/nginx/html/
EXPOSE 80