From c65facdbb5769f5e2a2d7563fe14f17eb75ae7b3 Mon Sep 17 00:00:00 2001 From: Madenix <80111658+CSoriot@users.noreply.github.com> Date: Thu, 26 Aug 2021 16:04:50 +0200 Subject: [PATCH] Update Dockerfile Added ARGS and "snpm config" to second part --- client/Dockerfile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/client/Dockerfile b/client/Dockerfile index 7874dbcd..5b2d7c88 100644 --- a/client/Dockerfile +++ b/client/Dockerfile @@ -45,6 +45,15 @@ export const environment = { \n\ FROM node:12.16.1-alpine AS builder WORKDIR /usr/src/app COPY --from=runner /usr/src/app/ . + +ARG HTTP_PROXY_URL +ARG HTTPS_PROXY_URL +ENV HTTPS_PROXY_URL $HTTPS_PROXY_URL +ENV HTTPS_PROXY_URL $HTTP_PROXY_URL + +RUN if [ -n "$HTTP_PROXY_URL" ] ; then npm config set proxy $HTTP_PROXY_URL ; : ; echo "http_proxy :: "$HTTP_PROXY_URL ; fi +RUN if [ -n "$HTTPS_PROXY_URL" ] ; then npm config set https-proxy $HTTPS_PROXY_URL ; : ; echo "https_proxy :: "$HTTPS_PROXY_URL ; fi + RUN npm install RUN npm run build --configuration=prod