Skip to content

Commit

Permalink
Added GIT_CLONE_JOBS ARG to Dockerfile (#34)
Browse files Browse the repository at this point in the history
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`
  • Loading branch information
ashley-b authored Jan 3, 2025
1 parent 0cf0959 commit 4dd1df4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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 \
Expand All @@ -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 \
Expand All @@ -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 \
Expand Down

0 comments on commit 4dd1df4

Please sign in to comment.