-
Notifications
You must be signed in to change notification settings - Fork 96
[ FIXED ] Cannot build Rust App Docker Image because of: spurious network error ... #176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I cannot reproduce the issue locally using the same image. I'm using this command to pull the exact same image as you used above and open in interactive Bash shell: $ docker run -it rust@sha256:a71cd88f9dd32fbdfa67c935f55165ddd89b7166e95de6c053c9bf33dd7381d In that shell, I'm then using root@6aa30c25e68e:/# curl -I https://index.crates.io/config.json
HTTP/2 200 What happens when you run |
As a side note, your issue is very difficult to read. It would be much easier to parse if the shell output was inside a code block. |
Me too I can run:
But it is NOT what I do: I am trying to build a docker image with a Rust App
2/ then, inside this project add a dependency, for example:
3/ Create a Dockerfile, like this one:
4/ And finally try to build the image with:
As you can see in the following log, I can resolve docker.io to get
This drives me crazy!!! Any help is welcome. |
Hm. I've went through the steps you listed, but cannot reproduce the issue locally. I also cloned https://github.com/MrMic/Rust_Web_Development and built the Dockerfiles in there without hitting the error. And judging from this build, the issue also doesn't appear on GitHub Actions. Given all of this, I still think this is a problem with your local Docker installation. Can you try to reproduce the issue in a different container, e.g. First, start the container: docker run -it --rm --name docker-rust-176 ubuntu:latest Inside the container, install apt update
apt install curl Then try to fetch the configuration: curl -I https://index.crates.io/config.json |
Everything is OK:
|
What I cannot explain is that inside the Docker Image construction, I can |
I finally found the issue!
Thanks, @jdno for the hint about Docker installation. It helps me Rgds, |
Great that you figured out the issue and that everything works now! 🥳 |
Hi,
When I try to build an image with Rust App, I got this:
=======================================================================
============================================================
Thank for the help.
Rgds,
Michaël
The text was updated successfully, but these errors were encountered: