Frontend/Dockerfile

30 lines
595 B
Docker
Raw Normal View History

2021-08-09 22:05:19 -04:00
FROM alpine:latest AS build
WORKDIR /usr/src/
2021-02-12 10:58:44 -05:00
2021-08-09 22:05:19 -04:00
RUN apk update
RUN apk add --no-cache nodejs npm
2021-02-12 10:58:44 -05:00
2021-08-09 22:05:19 -04:00
RUN npm install -g typescript@4.0.7 && \
npm install -g @angular/cli@11.2.9 || true --fo
2021-02-12 10:58:44 -05:00
2021-08-09 22:05:19 -04:00
ENV NG_CLI_ANALYTICS=ci
COPY . .
ARG ANGULAR_CONFIGURATION=production
2021-02-12 10:58:44 -05:00
2021-08-09 22:05:19 -04:00
RUN npm install --force
RUN ng build --configuration=$ANGULAR_CONFIGURATION --stats-json --source-map=false
FROM nginx:mainline-alpine
WORKDIR /usr/bin/
COPY nginx.conf /etc/nginx/nginx.conf
COPY --from=build /usr/src/dist/color-recipes-explorer-frontend/ .
2021-02-12 10:58:44 -05:00
2021-08-09 22:05:19 -04:00
ARG CRE_PORT=80
EXPOSE $CRE_PORT
2021-02-12 10:58:44 -05:00
CMD ["nginx", "-g", "daemon off;"]