From aef1a7e4033be12b4aae36a725f4f1bc141f92a6 Mon Sep 17 00:00:00 2001 From: Ximon Eighteen <3304436+ximon18@users.noreply.github.com> Date: Thu, 16 Sep 2021 15:11:44 +0200 Subject: [PATCH] Set CARGO_HTTP_MULTIPLEXING=false to work around 'cargo build' network failures when building the Docker image on CI environments. --- Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 33550e1..d986dfd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,11 @@ RUN apk add rust cargo WORKDIR /tmp/routinator COPY . . -RUN cargo build \ +# Force Cargo to use HTTP/1.1 without pipelining instead of HTTP/2 with +# multiplexing. This seems to help with various "spurious network error" +# warnings when Cargo attempts to fetch from crates.io when building this +# image on Docker Hub and GitHub Actions build machines. +RUN CARGO_HTTP_MULTIPLEXING=false cargo build \ --target x86_64-alpine-linux-musl \ --release \ --locked