diff --git a/Dockerfile.linux b/Dockerfile.linux index 2c55bc924d..9119fc1c86 100644 --- a/Dockerfile.linux +++ b/Dockerfile.linux @@ -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 @@ -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" \ No newline at end of file +# Build with --network=none +RUN --network=none /bin/bash -c "source shared_functions.sh && build_all" \ No newline at end of file diff --git a/shared_functions.sh b/shared_functions.sh index 9e8530e9f8..98d5714e01 100755 --- a/shared_functions.sh +++ b/shared_functions.sh @@ -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