Skip to content
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

Cargo stuck on "Updating crates.io index" when run from docker on DigitalOcean droplet #4

Closed
nseymoursmith opened this issue Nov 8, 2023 · 5 comments
Assignees

Comments

@nseymoursmith
Copy link
Owner

Also gets stuck here when running on my machine (ubuntu 22). Not cool cargo, not cool.

Anyway, it looks like other people have seen this and added some wizardry to the build definitions to fix it:

rust-lang/docker-rust#111
rust-lang/cargo#10781
rust-lang/rust#64248
https://stackoverflow.com/questions/67001033/skip-updating-crates-io-index-when-using-cargo-run

To make this work, we should figure out which of these, if any, is the right bit of wizardry.

@nseymoursmith
Copy link
Owner Author

@KevNickells @KevT-plan (which of these should I use), just alerting you to the fact that this is blocking the piece of work that I said I'd do to unblock you!
I'll get round to it soon.

@KevNickells
Copy link
Collaborator

@KevNickells @KevT-plan (which of these should I use), just alerting you to the fact that this is blocking the piece of work that I said I'd do to unblock you! I'll get round to it soon.

Current account - @KevNickells - thanks!

@nrs23
Copy link
Contributor

nrs23 commented Nov 9, 2023

OK So I've tried a series of solutions and I have thoughts:
First two solutions come from: rust-lang/docker-rust#111 (comment)

I tried using the spare build index option suggestion, but apparently now thats the default so this is not working.

I then tried the extra steps to build the index in the docker image before compiling the code, it still hung.

The last solution that could be tried is explained here: rust-lang/docker-rust#111 (comment)

and it essentially amounts to building the index on your local machine and sharing that with the docker image at build time.

I don't really think that that solution is very satisfactory as it undercuts the benefit of using docker in the first place by relying on your local environment.

SO my feeling is that maybe for now docker isn't the right solution for using rust since

a) running a similar docker command on your machine and mine is producing different results
b) the results on my machine are unusable without putting in a bunch of extra work and/or relying on local environment

And the question then is:

  • should we just trust rust to compile correctly across our different platforms (ditch docker?)
  • should we ditch rust for something else?
  • Am I jumping the gun?

Thoughts appreciated @KevNickells

@nrs23
Copy link
Contributor

nrs23 commented Nov 10, 2023

Latest commit to deploy-without-docker branch is a good stopping point to consider the 'ditch docker' approach:
d8996fd

deploy-rust.sh script tested on the DO droplet and working.

@nseymoursmith
Copy link
Owner Author

I've broken out the 'deploy without docker' bit to its own issue (#6) because there's potentially still other solutions to this issue (though I'm not too keen on digging further personally).

nseymoursmith added a commit that referenced this issue Nov 19, 2023
closes #2, closes #4, closes #6; [FEATURE] Deploy rust without docker
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