Skip to content

Commit 7d83efe

Browse files
authored
(ci): fix cross compilation (#6516)
by setting CARGO_NET_GIT_FETCH_WITH_CLI=true Signed-off-by: Bryce Palmer <[email protected]>
1 parent bd0ccd2 commit 7d83efe

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: images/ansible-operator/base.Dockerfile

+6
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
99
ENV PATH="/root/.cargo/bin:${PATH}"
1010
RUN rustc --version
1111

12+
# When cross-compiling the container, cargo uncontrollably consumes memory and
13+
# gets killed by the OOM Killer when it fetches dependencies. The workaround is
14+
# to use the git executable.
15+
# See https://github.com/rust-lang/cargo/issues/10583 for details.
16+
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
17+
1218
# Copy python dependencies (including ansible) to be installed using Pipenv
1319
COPY Pipfile* ./
1420
# Instruct pip(env) not to keep a cache of installed packages,

0 commit comments

Comments
 (0)