mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-25 08:52:26 +00:00
Dockerfile: add option to set build parallelism
This commit is contained in:
parent
f51bac990e
commit
37f9c6e651
2 changed files with 7 additions and 1 deletions
|
@ -21,8 +21,10 @@ RUN apt-get update && \
|
||||||
|
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
ARG NPROC
|
||||||
RUN rm -rf build && \
|
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
|
# runtime stage
|
||||||
FROM ubuntu:16.04
|
FROM ubuntu:16.04
|
||||||
|
|
|
@ -140,8 +140,12 @@ Installing a snap is very quick. Snaps are secure. They are isolated with all of
|
||||||
|
|
||||||
* Docker
|
* Docker
|
||||||
|
|
||||||
|
# Build using all available cores
|
||||||
docker build -t monero .
|
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
|
# either run in foreground
|
||||||
docker run -it -v /monero/chain:/root/.bitmonero -v /monero/wallet:/wallet -p 18080:18080 monero
|
docker run -it -v /monero/chain:/root/.bitmonero -v /monero/wallet:/wallet -p 18080:18080 monero
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue