diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..fff6d74 --- /dev/null +++ b/Dockerfile @@ -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"]