From 200c8dbdeb0c433a2810eae2f1b97dff61441c5f Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Fri, 2 Aug 2019 14:37:20 +0200 Subject: [PATCH] Use --only=production on npm install Add --only=production flag to Dockerfile and the README entries describing how to install nodes. This will avoid pulling in a lot of dependencies that are not needed for running master/slaves. --- Dockerfile | 2 +- README.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 399c1259..b754a329 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM node:9.11.2 RUN apt-get update && apt install git curl tar -y RUN mkdir factorioClusterio -RUN git clone -b master https://github.com/Danielv123/factorioClusterio.git && cd factorioClusterio && npm install +RUN git clone -b master https://github.com/Danielv123/factorioClusterio.git && cd factorioClusterio && npm install --only=production RUN cd factorioClusterio && curl -o factorio.tar.gz -L https://www.factorio.com/get-download/latest/headless/linux64 && tar -xf factorio.tar.gz WORKDIR factorioClusterio diff --git a/README.md b/README.md index 99a9995e..68efdcbe 100644 --- a/README.md +++ b/README.md @@ -95,7 +95,7 @@ Master and all slaves: cd factorioClusterio curl -o factorio.tar.gz -L https://www.factorio.com/get-download/latest/headless/linux64 tar -xf factorio.tar.gz - npm install + npm install --only=production cp config.json.dist config.json node ./lib/npmPostinstall.js @@ -283,7 +283,7 @@ node client.js list ``` git pull -npm install +npm install --only=production ``` 3. Download the latest version of the factorioClusterioMod from its github repo