rust-lang / docker-rust-nightly

63 stars 30 forks source link

docker build failing with wget: unable to resolve host address #23

Closed sibman closed 4 years ago

sibman commented 4 years ago

I have tried to build the docker-rust-nightly image and all of the images failing with similar error. Here is my docker information: docker version Client: Version: 19.03.6 API version: 1.40 Go version: go1.12.17 Git commit: 369ce74a3c Built: Fri Feb 28 23:45:43 2020 OS/Arch: linux/amd64 Experimental: false

Server: Engine: Version: 19.03.6 API version: 1.40 (minimum version 1.12) Go version: go1.12.17 Git commit: 369ce74a3c Built: Wed Feb 19 01:06:16 2020 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.3.3-0ubuntu1~18.04.2 GitCommit:
runc: Version: spec: 1.0.1-dev GitCommit:
docker-init: Version: 0.18.0 GitCommit:

Here I'm attaching couple of build logs.

docker build -t rust:nightly nightly Sending build context to Docker daemon 3.584kB Step 1/3 : FROM buildpack-deps:stretch ---> 545bd80faf41 Step 2/3 : ENV RUSTUP_HOME=/usr/local/rustup CARGO_HOME=/usr/local/cargo PATH=/usr/local/cargo/bin:$PATH ---> Using cache ---> 23cc7f4ddf02 Step 3/3 : RUN set -eux; url="https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init"; wget "$url"; chmod +x rustup-init; ./rustup-init -y --no-modify-path --default-toolchain nightly; rm rustup-init; chmod -R a+w $RUSTUP_HOME $CARGO_HOME; rustup --version; cargo --version; rustc --version; ---> Running in 9dbc12104676

docker build -t rust:nightly nightly Sending build context to Docker daemon 3.584kB Step 1/3 : FROM buildpack-deps:buster buster: Pulling from library/buildpack-deps f15005b0235f: Pull complete 41ebfd3d2fd0: Pull complete b998346ba308: Pull complete f01ec562c947: Pull complete 2447a2c11907: Pull complete Digest: sha256:4af1d565ec5928711ff3df178868160b5bb12d698ebb439c0eb2ca7457642a91 Status: Downloaded newer image for buildpack-deps:buster ---> af5c385d7e88 Step 2/3 : ENV RUSTUP_HOME=/usr/local/rustup CARGO_HOME=/usr/local/cargo PATH=/usr/local/cargo/bin:$PATH ---> Running in 60a2cf6056b9 Removing intermediate container 60a2cf6056b9 ---> fc62dbeeb45b Step 3/3 : RUN set -eux; url="https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init"; wget "$url"; chmod +x rustup-init; ./rustup-init -y --no-modify-path --default-toolchain nightly; rm rustup-init; chmod -R a+w $RUSTUP_HOME $CARGO_HOME; rustup --version; cargo --version; rustc --version; ---> Running in 99e7d6651564

sfackler commented 4 years ago

This seems like a networking issue on your end, or maybe a transient DNS issue. static.rust-lang.org definitely exists.

sibman commented 4 years ago

I could execute the commands which listed in docker file with out any issues from the host os, but when I attaching to container terminal of buildpack-deps:stretch image and trying to run wget command from a container I'm getting identical results as I presented in logs. Here I'm attaching the steps to replicate the issue.

docker run -it buildpack-deps:stretch /bin/bash root@27e7b911e0d3:/# wget https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init --2020-04-10 14:04:19-- https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init Resolving static.rust-lang.org (static.rust-lang.org)... failed: Temporary failure in name resolution. wget: unable to resolve host address 'static.rust-lang.org' root@27e7b911e0d3:/#

sfackler commented 4 years ago

That looks like an issue with Docker rather than the nightly rust image, so I'd look in that direction.