Skip to content

Commit

Permalink
Make cargo use the "sparse" protocol to download the creates index.
Browse files Browse the repository at this point in the history
The default protocol that Cargo is using to download its index of
crates is somehow too resource-consuming when the ODK is built under
BuildKit (to build multiarch image). So we force Cargo to use the new
HTTP-based "sparse" protocol, which is supposedly much more efficient
and does not seem to cause issue with BuildKit.
  • Loading branch information
gouttegd committed Sep 27, 2023
1 parent 179fb3c commit cad2cf9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docker/builder/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ RUN wget -nv https://github.com/fastobo/fastobo-validator/archive/refs/tags/v$FA
-O /build/fastobo-validator-$FASTOBO_VALIDATOR_VERSION.tar.gz && \
tar xf fastobo-validator-$FASTOBO_VALIDATOR_VERSION.tar.gz && \
cd fastobo-validator-$FASTOBO_VALIDATOR_VERSION && \
cargo build --release && \
cargo build --release -Z sparse-registry && \
install -D -m 755 target/release/fastobo-validator /staging/full/usr/bin/fastobo-validator && \
cd /build && \
rm -rf fastobo-validator-$FASTOBO_VALIDATOR_VERSION fastobo-validator-$FASTOBO_VALIDATOR_VERSION.tar.gz /root/.cargo
Expand All @@ -94,7 +94,7 @@ RUN wget -nv https://github.com/ontodev/rdftab.rs/archive/refs/tags/v$RDFTAB_VER
-O /build/rdftab.tar.gz && \
tar xf rdftab.tar.gz && \
cd rdftab.rs-$RDFTAB_VERSION && \
cargo build --release && \
cargo build --release -Z sparse-registry && \
install -D -m 755 target/release/rdftab /staging/full/usr/bin/rdftab && \
cd /build && \
rm -rf rdftab.rs-$RDFTAB_VERSION rdftab.tar.gz /root/.cargo

0 comments on commit cad2cf9

Please sign in to comment.