Merge pull request #2910

37f9c6e6 Dockerfile: add option to set build parallelism (MoroccanMalinois)
This commit is contained in:
Riccardo Spagni 2017-12-25 21:16:59 +02:00
commit f04d4a78de
No known key found for this signature in database
GPG key ID: 55432DF31CCD4FCD
2 changed files with 7 additions and 1 deletions

View file

@ -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

View file

@ -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