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

Commit

Permalink
Create Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
ll911 authored Oct 25, 2018
1 parent dc7a1c0 commit 8f8ce43
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM node:8

USER app
WORKDIR /opt
COPY . /opt

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 --no-cache npm@latest -g && npm i --no-cache -g @angular/cli \
&& npm install --no-cache \
&& ng build --prod

CMD ["cp", "-r", "/opt/dist/*", "/dist"]

0 comments on commit 8f8ce43

Please sign in to comment.