summary refs log tree commit diff
path: root/docker/Dockerfile
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2022-10-13 19:16:21 +0100
committerGitHub <noreply@github.com>2022-10-13 18:16:21 +0000
commit29ee4b6698e3f5fd06406e194e6d88cff623fa7b (patch)
tree5631836ebba39a7af42e049dfae8e76067c81a4d /docker/Dockerfile
parentOptimise the event_push_backfill_thread_id bg job (#14172) (diff)
downloadsynapse-29ee4b6698e3f5fd06406e194e6d88cff623fa7b.tar.xz
Fix docker build OOMing in CI for arm64 builds (#14173)
Co-authored-by: David Robertson <davidr@element.io>
Diffstat (limited to '')
-rw-r--r--docker/Dockerfile6
1 files changed, 6 insertions, 0 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 8be49681b4..62f0a9bf93 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -108,6 +108,12 @@ RUN mkdir /rust /cargo
 
 RUN curl -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path --default-toolchain stable
 
+
+# arm64 builds consume a lot of memory if `CARGO_NET_GIT_FETCH_WITH_CLI` is not
+# set to true, so we expose it as a build-arg.
+ARG CARGO_NET_GIT_FETCH_WITH_CLI=false
+ENV CARGO_NET_GIT_FETCH_WITH_CLI=$CARGO_NET_GIT_FETCH_WITH_CLI
+
 # To speed up rebuilds, install all of the dependencies before we copy over
 # the whole synapse project, so that this layer in the Docker cache can be
 # used while you develop on the source