This repository was archived by the owner on Apr 26, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 2727
2828 - name : Inspect builder
2929 run : docker buildx inspect
30-
30+
3131 - name : Log in to DockerHub
3232 uses : docker/login-action@v2
3333 with :
5555 tags : " ${{ steps.set-tag.outputs.tags }}"
5656 file : " docker/Dockerfile"
5757 platforms : linux/amd64,linux/arm64
58+ build-args :
59+ # arm64 builds OOM otherwise. c.f. https://github.com/rust-lang/cargo/issues/10583
60+ CARGO_NET_GIT_FETCH_WITH_CLI : true
Original file line number Diff line number Diff line change 1+ Fix docker build OOMing in CI for arm64 builds.
Original file line number Diff line number Diff line change @@ -108,6 +108,12 @@ RUN mkdir /rust /cargo
108108
109109RUN curl -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path --default-toolchain stable
110110
111+
112+ # arm64 builds consume a lot of memory if `CARGO_NET_GIT_FETCH_WITH_CLI` is not
113+ # set to true, so we expose it as a build-arg.
114+ ARG CARGO_NET_GIT_FETCH_WITH_CLI=false
115+ ENV CARGO_NET_GIT_FETCH_WITH_CLI=$CARGO_NET_GIT_FETCH_WITH_CLI
116+
111117# To speed up rebuilds, install all of the dependencies before we copy over
112118# the whole synapse project, so that this layer in the Docker cache can be
113119# used while you develop on the source
You can’t perform that action at this time.
0 commit comments