aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2017-12-25 21:16:59 +0200
committerRiccardo Spagni <ric@spagni.net>2017-12-25 21:17:00 +0200
commitf04d4a78de257d44f62ca00e0d3ed9ca6ab57a46 (patch)
tree1b57a4d20312325b230a47f5762ccb25ca05911f
parentMerge pull request #2909 (diff)
parentDockerfile: add option to set build parallelism (diff)
downloadmonero-f04d4a78de257d44f62ca00e0d3ed9ca6ab57a46.tar.xz
Merge pull request #2910
37f9c6e6 Dockerfile: add option to set build parallelism (MoroccanMalinois)
-rw-r--r--Dockerfile4
-rw-r--r--README.md4
2 files changed, 7 insertions, 1 deletions
diff --git a/Dockerfile b/Dockerfile
index 71b0658a0..a62e263cb 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -21,8 +21,10 @@ RUN apt-get update && \
WORKDIR /src
COPY . .
+
+ARG NPROC
RUN rm -rf build && \
- make -j$(nproc) release-static
+ if [ -z "$NPROC" ];then make -j$(nproc) release-static;else make -j$NPROC release-static;fi
# runtime stage
FROM ubuntu:16.04
diff --git a/README.md b/README.md
index 9cd56ea59..dc558dfe9 100644
--- a/README.md
+++ b/README.md
@@ -136,7 +136,11 @@ Installing a snap is very quick. Snaps are secure. They are isolated with all of
* Docker
+ # Build using all available cores
docker build -t monero .
+
+ # or build using a specific number of cores (reduce RAM requirement)
+ docker build --build-arg NPROC=1 -t monero .
# either run in foreground
docker run -it -v /monero/chain:/root/.bitmonero -v /monero/wallet:/wallet -p 18080:18080 monero