Skip to content
This repository has been archived by the owner on Jul 15, 2021. It is now read-only.

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
ll911 authored Jul 3, 2018
1 parent d32d828 commit c02fc86
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,19 @@ 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
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"]

0 comments on commit c02fc86

Please sign in to comment.