From 8f8ce4354dd3eedd8c319a610dde6d4fea11032b Mon Sep 17 00:00:00 2001 From: Leo Date: Thu, 25 Oct 2018 14:26:17 -0700 Subject: [PATCH] Create Dockerfile --- Dockerfile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 Dockerfile 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"]