Skip to content

Commit

Permalink
add repo loop/run network none
Browse files Browse the repository at this point in the history
  • Loading branch information
plowsof committed Sep 23, 2024
1 parent 698c32b commit d324961
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 5 additions & 3 deletions Dockerfile.linux
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ WORKDIR /sources
COPY shared_functions.sh shared_functions.sh
RUN chmod +x shared_functions.sh

RUN /bin/bash -c "source shared_functions.sh && get_debs_gitcloner && install_debs_gitcloner && clone_git_repos"
RUN /bin/bash -c "source shared_functions.sh && get_debs_gitcloner"
RUN --network=none /bin/bash -c "source shared_functions.sh && install_debs_gitcloner"
RUN /bin/bash -c "source shared_functions.sh && clone_git_repos"

# Stage 3: Builder
FROM ubuntu:16.04@sha256:1f1a2d56de1d604801a9671f301190704c25d604a416f59e03c04f5c6ffee0d6 as builder
Expand All @@ -47,5 +49,5 @@ COPY --from=gitcloner /sources /sources
COPY shared_functions.sh shared_functions.sh
RUN chmod +x shared_functions.sh

# Single CMD with multiple build steps
RUN /bin/bash -c "source shared_functions.sh && build_all"
# Build with --network=none
RUN --network=none /bin/bash -c "source shared_functions.sh && build_all"
4 changes: 3 additions & 1 deletion shared_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,9 @@ install_debs_gitcloner() {
}

clone_git_repos() {
git_clone_reset "${gitrepo_list[@]}"
for repo in "${gitrepo_list[@]}"; do
git_clone_reset "$repo"
done
#Qt5 special case todo: commit hashes
git clone git://code.qt.io/qt/qt5.git -b ${QT_VERSION} --depth 1
cd qt5
Expand Down

0 comments on commit d324961

Please sign in to comment.