From c02fc86abbc16a69c65dcdc7d91ad377c4c5ffd6 Mon Sep 17 00:00:00 2001 From: Leo Date: Tue, 3 Jul 2018 14:31:10 -0700 Subject: [PATCH] Update Dockerfile --- Dockerfile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index dfe4bf7..4813950 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,10 +23,10 @@ COPY . /app RUN NPM_CONFIG_PREFIX=/npm-global \ PATH=$NPM_CONFIG_PREFIX/bin:$NPM_CONFIG_PREFIX/lib/node_modules/@angular/cli/bin:$PATH \ - && echo "prefix=/npm-global" > ~/.npmrc \ - && npm i npm@latest -g && npm i -g @angular/cli \ - && npm install \ - && ng build --configuration=${configuration} --prod + && echo "prefix=/npm-global" > ~/.npmrc \ + && npm i npm@latest -g && npm i -g @angular/cli \ + && npm install \ + && ng build --configuration=${configuration} --prod # end of NodeJS build env # prepare hosting and build env cleanup @@ -34,7 +34,8 @@ USER root ADD Caddyfile /etc/Caddyfile RUN curl -L "https://github.com/mholt/caddy/releases/download/v0.11.0/caddy_v0.11.0_linux_amd64.tar.gz" \ | tar --no-same-owner -C /usr/bin/ -xz caddy \ - && apk del .dev && rm -rf /app /npm-global && cp -r /app/dist/* /var/www/ + && cp -r /app/dist/* /var/www/ \ + && apk del .dev && rm -rf /app /npm-global EXPOSE 8000 CMD ["caddy", "-quic", "--conf", "/etc/Caddyfile"]