docs: Add a section in the Rust guide to use DHI
Description
Updated the Rust language guide to include Docker Hardened Images (DHI).
Changes include:
- Added DHI as an option with tab-based layout (Official image / Hardened image)
- Added a DHI-based Dockerfile example
- Updated build instructions to match docker init behavior
- Added DHI quickstart link in "Related information"
This follows the same structure used in the Bun and Ruby DHI updates.
Reviews
- [ ] Technical review
- [x] Editorial review
- [ ] Product review
Deploy Preview for docsdocker ready!
| Name | Link |
|---|---|
| Latest commit | b772b34c4060837bc10f1fdeaa6b4cf6757a9f2b |
| Latest deploy log | https://app.netlify.com/projects/docsdocker/deploys/6921bf173d3efb00087c72df |
| Deploy Preview | https://deploy-preview-23728--docsdocker.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify project configuration.
@edithturn I mirrored Rust images to my account, and the actual language version is 1.91.1. Maybe the guide should be updated to it?
@edithturn I mirrored Rust images to my account, and the actual language version is 1.91.1. Maybe the guide should be updated to it?
Hi @igor-alexandrov , thank you for the review and for pointing this out! 🙌 I’ve updated the Rust version to the latest one as suggested.
While testing, I also noticed that one of the dependencies in the Hello World base example (used by this part of the docs) didn’t compile with Rust 1.91.1 (but worked with 1.70.0), so I opened a PR to update the Cargo.toml and fix the build there as well:
👉 https://github.com/docker/docker-rust-hello/pull/1
Thanks again for the feedback, I really appreciate it!
Thanks @edithturn. Sorry, we had to quietly pause all reviews/changes for the surprise DHI free updates. Can you help update this based on that?
Essentially, for DHI, mirroring is no longer required, and users can directly use the public images at dhi.io/<image>:<tag> as long as they authenticate.