Allow customizing #jobs for make

This commit is contained in:
James Lu 2021-02-07 12:19:56 -08:00
parent 95dd17737f
commit b212db0de1
2 changed files with 3 additions and 1 deletions

View file

@ -5,6 +5,7 @@ ARG BUILD_CONTRIB_MODULES=
FROM alpine:latest AS builder
ARG ATHEME_VERSION
ARG BUILD_CONTRIB_MODULES
ARG MAKE_NUM_JOBS
RUN mkdir /atheme-src
# Install build-deps and runtime deps
@ -26,7 +27,7 @@ RUN cd /atheme-src/libmowgli-2 && \
# Configure and build
RUN cd /atheme-src && \
./configure --prefix=/atheme $(test -z "$BUILD_CONTRIB_MODULES" || echo --enable-contrib) && \
make -j$(nproc) && make install
make -j${MAKE_NUM_JOBS:-$(nproc)} && make install
FROM alpine:latest

View file

@ -30,3 +30,4 @@ For those who want to create customized builds, here are options exposed by the
- `ATHEME_UID`: sets the UID for the Atheme user to run as. Defaults to 10000.
- `ATHEME_VERSION`: Atheme version to pull from Git
- `BUILD_CONTRIB_MODULES`: if set to a non-empty value, enables building contrib modules.
- `MAKE_NUM_JOBS`: sets the `-j` flag for make. Defaults to `$(nproc)` if left empty.