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

Consider fixing versions in Dockerfile #43

Closed
ErikSchierboom opened this issue Dec 10, 2021 · 5 comments
Closed

Consider fixing versions in Dockerfile #43

ErikSchierboom opened this issue Dec 10, 2021 · 5 comments

Comments

@ErikSchierboom
Copy link
Member

Currently, the Dockerfile uses the following base images:

  • rustlang/rust:nightly
  • rust:latest

As seen, neither of these are pinned to a specific version. While this works, it effectively cancels any docker caching whenever those images are updated. Put differently: if only code involving the very last step of the Dockerfile was changed but the nightly release was changed (which it does, I guess, each night), this means re-building everything. This is both wasteful and very slow. Is it perhaps possible to pin these images to specific versions/commits?

@ErikSchierboom
Copy link
Member Author

@ZloeSabo If you're interested, maybe you could look at this issue? It would be great if we could pin the version. That would help with reducing potential breakages and with docker layer caching.

@senekor
Copy link
Contributor

senekor commented Jul 17, 2023

We have since switched to a pinned version of Rust (6772d51).

One line that's still suspicious is RUN rustup toolchain add nightly. I think docker doesn't rerun this line on its own, right? In the docs, a couple paragraphs below the linked heading, there's a note which suggests RUN commands aren't rerun on their own. But I don't really understand how docker's caching works.

If I got that wrong and the nightly version should be pinned explicitly, that can be done without too much trouble.

@ErikSchierboom
Copy link
Member Author

I think docker doesn't rerun this line on its own, right?

Correct. Do we still need the nightly version?

@senekor
Copy link
Contributor

senekor commented Jul 18, 2023

Unfortunately, yes. (rust-lang/rust#49359)

I'm keeping an eye on cargo-nextest an alternative test runner. It also doesn't have json output yet, but might get it sooner. (nextest-rs/nextest#20)

@ErikSchierboom
Copy link
Member Author

Holy smokes that has been behind a flag for a long time.

@senekor senekor closed this as completed Jul 20, 2023
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

2 participants