Skip to content

Commit cad2cf9

Browse files
committed
Make cargo use the "sparse" protocol to download the creates index.
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.
1 parent 179fb3c commit cad2cf9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docker/builder/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ RUN wget -nv https://github.com/fastobo/fastobo-validator/archive/refs/tags/v$FA
8484
-O /build/fastobo-validator-$FASTOBO_VALIDATOR_VERSION.tar.gz && \
8585
tar xf fastobo-validator-$FASTOBO_VALIDATOR_VERSION.tar.gz && \
8686
cd fastobo-validator-$FASTOBO_VALIDATOR_VERSION && \
87-
cargo build --release && \
87+
cargo build --release -Z sparse-registry && \
8888
install -D -m 755 target/release/fastobo-validator /staging/full/usr/bin/fastobo-validator && \
8989
cd /build && \
9090
rm -rf fastobo-validator-$FASTOBO_VALIDATOR_VERSION fastobo-validator-$FASTOBO_VALIDATOR_VERSION.tar.gz /root/.cargo
@@ -94,7 +94,7 @@ RUN wget -nv https://github.com/ontodev/rdftab.rs/archive/refs/tags/v$RDFTAB_VER
9494
-O /build/rdftab.tar.gz && \
9595
tar xf rdftab.tar.gz && \
9696
cd rdftab.rs-$RDFTAB_VERSION && \
97-
cargo build --release && \
97+
cargo build --release -Z sparse-registry && \
9898
install -D -m 755 target/release/rdftab /staging/full/usr/bin/rdftab && \
9999
cd /build && \
100100
rm -rf rdftab.rs-$RDFTAB_VERSION rdftab.tar.gz /root/.cargo

0 commit comments

Comments
 (0)