From f9dea8a52cc1d2c03d59a45f3c5235fb579f8990 Mon Sep 17 00:00:00 2001 From: "Juan Picado @jotadeveloper" Date: Tue, 18 Jul 2017 20:53:37 +0200 Subject: [PATCH] refactor: Dockerfile command in one line, save one layer --- Dockerfile | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7b8147af9..ccc48e8ec 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,18 +12,17 @@ WORKDIR $APPDIR ADD . $APPDIR -RUN npm config set registry http://registry.npmjs.org/ - -RUN npm install -g -s --no-progress yarn --pure-lockfile && \ - yarn - ENV NODE_ENV=production -RUN yarn run build:webui && \ - yarn cache clean && \ - yarn install --production --pure-lockfile +RUN npm config set registry http://registry.npmjs.org/ && \ + npm install -g -s --no-progress yarn --pure-lockfile && \ + yarn install --production=false && \ + yarn run build:webui && \ + yarn cache clean && \ + yarn install --production=true --pure-lockfile RUN mkdir -p /verdaccio/storage /verdaccio/conf + ADD conf/docker.yaml /verdaccio/conf/config.yaml RUN addgroup -S verdaccio && adduser -S -G verdaccio verdaccio && \