Skip to content

Commit

Permalink
(ci): fix cross compilation
Browse files Browse the repository at this point in the history
by setting CARGO_NET_GIT_FETCH_WITH_CLI=true

Signed-off-by: Bryce Palmer <[email protected]>
  • Loading branch information
everettraven committed Jul 26, 2023
1 parent bd0ccd2 commit e48315e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions images/ansible-operator/base.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
RUN rustc --version

# When cross-compiling the container, cargo uncontrollably consumes memory and
# gets killed by the OOM Killer when it fetches dependencies. The workaround is
# to use the git executable.
# See https://github.com/rust-lang/cargo/issues/10583 for details.
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true

# Copy python dependencies (including ansible) to be installed using Pipenv
COPY Pipfile* ./
# Instruct pip(env) not to keep a cache of installed packages,
Expand Down

0 comments on commit e48315e

Please sign in to comment.