30 lines
1.0 KiB
Docker
Executable File
30 lines
1.0 KiB
Docker
Executable File
# Git clone
|
|
FROM alpine/git:v2.30.1 AS code
|
|
ARG BUILD_ID
|
|
ARG GITEA_USER
|
|
ARG GITEA_PASS
|
|
RUN echo $BUILD_ID
|
|
LABEL stage=builder
|
|
LABEL build_id=$BUILD_ID
|
|
RUN mkdir repo
|
|
WORKDIR /repo
|
|
RUN git clone http://$GITEA_USER:$GITEA_PASS@git.io8.dev/risadmin_prod/prod28oct.git
|
|
# angular build
|
|
FROM node:16.20.2-alpine3.18 as build
|
|
LABEL stage=app
|
|
LABEL build_id=$BUILD_ID
|
|
WORKDIR /usr/src/app
|
|
COPY --from=code /repo/prod28oct/prod28oct-front-f/authsec_angular/frontend/angular-clarity-master/package.json /repo/prod28oct/prod28oct-front-f/authsec_angular/frontend/angular-clarity-master/package-lock.json ./
|
|
RUN npm install
|
|
COPY --from=code /repo/prod28oct/prod28oct-front-f/authsec_angular/frontend/angular-clarity-master .
|
|
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
|
|
|