From 4dd1df496907fa7af9a77c717dbd64eb9b9a62cf Mon Sep 17 00:00:00 2001 From: ashley-b Date: Fri, 3 Jan 2025 19:21:43 +1100 Subject: [PATCH] Added GIT_CLONE_JOBS ARG to Dockerfile (#34) The hardcoded GIT_CLONE_JOBS value was too high for some systems. This commit exposes the number of jobs as a docker argument so users can control it via `docker build --build-arg GIT_CLONE_JOBS=N` --- Dockerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index a0c9194..27a2cbd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,9 @@ # Start from the latest Swift nightly main toolchain FROM swiftlang/swift:nightly-main-jammy +# The number of submodules fetched at the same time +ARG GIT_CLONE_JOBS=24 + # Install ESP-IDF dependencies RUN apt-get update \ && apt-get install --yes --no-install-recommends \ @@ -19,7 +22,7 @@ RUN mkdir -p ~/esp \ --depth 1 \ --shallow-submodules \ --recursive https://github.com/espressif/esp-idf.git \ - --jobs 24 + --jobs $GIT_CLONE_JOBS # Install ESP-IDF RUN cd ~/esp/esp-idf \ @@ -41,7 +44,7 @@ RUN mkdir -p ~/esp \ --depth 1 \ --shallow-submodules \ --recursive https://github.com/espressif/esp-matter.git \ - --jobs 24 + --jobs $GIT_CLONE_JOBS # Download ESP-Matter RUN mkdir -p ~/esp \