Skip to content

Rewrite Dockerfile to share layers with analyzer#195

Merged
senekor merged 2 commits intomainfrom
senekor/lktxzzvmwnuy
May 5, 2026
Merged

Rewrite Dockerfile to share layers with analyzer#195
senekor merged 2 commits intomainfrom
senekor/lktxzzvmwnuy

Conversation

@senekor
Copy link
Copy Markdown
Contributor

@senekor senekor commented May 5, 2026

The main goal of this is to bring the Dockerfiles of the test-runner and analyzer in sync, so they can share the big layers containing the Rust toolchain and local cargo registry.

Some incidental changes / improvements that were made:

  • Use an official base image with a nightly Rust toolchain, but pinned to a specific hash. This avoids our cache being invalidated every day, without us needing to copy-paste the upstream build script.

  • Make local-registry/Cargo.toml more readable for users by moving irrelevant stuff to the bottom. Exercises contain a link to this file, so that students can check themselves which crates are available.

  • Use heredoc in the Dockerfile for better readability and to reduce the number of intermediate layers generated during a build.

The forum post discussing this:
https://forum.exercism.org/t/requesting-rust-docker-base-repository/48577

The main goal of this is to bring the Dockerfiles of the test-runner and
analyzer in sync, so they can share the big layers containing the Rust
toolchain and local cargo registry.

Some incidental changes / improvements that were made:

* Use an official base image with a nightly Rust toolchain, but pinned
  to a specific hash. This avoids our cache being invalidated every day,
  without us needing to copy-paste the upstream build script.

* Make local-registry/Cargo.toml more readable for users by moving
  irrelevant stuff to the bottom. Exercises contain a link to this file,
  so that students can check themselves which crates are available.

* Use heredoc in the Dockerfile for better readability and to reduce the
  number of intermediate layers generated during a build.
@senekor senekor requested a review from a team as a code owner May 5, 2026 13:46
Comment thread Dockerfile Outdated
Co-authored-by: Isaac Good <IsaacG@users.noreply.github.com>
@senekor senekor merged commit fe79ceb into main May 5, 2026
1 check passed
@senekor senekor deleted the senekor/lktxzzvmwnuy branch May 5, 2026 16:43
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

Successfully merging this pull request may close these issues.

2 participants