Skip to content

Rust image creation fail due to: "download of config.json failed" #121143

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

Closed
MrMic opened this issue Feb 15, 2024 · 3 comments
Closed

Rust image creation fail due to: "download of config.json failed" #121143

MrMic opened this issue Feb 15, 2024 · 3 comments

Comments

@MrMic
Copy link

MrMic commented Feb 15, 2024

Hi,

When i try to buils an image for a rust App I always got this error:

0.544 Updating crates.io index 0.548 warning: spurious network error (3 tries remaining): [6] Couldn't resolve host name (Could not resolve host: index.crates.io) 1.940 warning: spurious network error (2 tries remaining): [6] Couldn't resolve host name (Could not resolve host: index.crates.io) 5.441 warning: spurious network error (1 tries remaining): [6] Couldn't resolve host name (Could not resolve host: index.crates.io) 11.94 error: failed to getchronoas a dependency of packagerust-web-dev v1.0.0 (/app)11.94 11.94 Caused by: 11.94 failed to query replaced source registrycrates-io11.94 11.94 Caused by: 11.94 download of config.json failed 11.94 11.94 Caused by: 11.94 failed to download fromhttps://index.crates.io/config.json`
11.94
11.94 Caused by:
11.94 [6] Couldn't resolve host name (Could not resolve host: index.crates.io)

`

Any idea to solve this?
I am stuck and have not find any fix that works on internet.
:(

Rgds,

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Feb 15, 2024
@saethlin
Copy link
Member

Could not resolve host: index.crates.io

Cargo is trying to resolve the domain name index.crates.io and can't. This is a DNS issue, possibly an issue with your local network or local machine. The domain name currently resolves from where I am.

@MrMic
Copy link
Author

MrMic commented Feb 15, 2024

Not at all! Everything is working perfectly fine on my host.
The issue is inside the container ... and indeed it is a domain
name issue when I create the image from a rust app.
What is weird is that when I run a rust container alone from CLI and
log into it, I can download what I want.

@saethlin saethlin changed the title Rust Iamge creation fail due to: "download of config.json failed" Rust image creation fail due to: "download of config.json failed" Feb 15, 2024
@saethlin
Copy link
Member

The issue tracker is for problems or features in Rust or the tools we distribute. It sounds like you need support with using Cargo in your Docker setup, so one of these places would be a better place to get help: https://www.rust-lang.org/community

@saethlin saethlin removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants