Skip to content

guides: update rust guide#24386

Merged
craig-osterhout merged 1 commit intodocker:mainfrom
craig-osterhout:issue-24362
Mar 17, 2026
Merged

guides: update rust guide#24386
craig-osterhout merged 1 commit intodocker:mainfrom
craig-osterhout:issue-24362

Conversation

@craig-osterhout
Copy link
Contributor

Description

The DHI static image has no adduser package, plus it already runs as a nonroot user. Removed that section from the Dockerfile.

Related issues or tickets

Closes #24362

Reviews

  • Editorial review

Signed-off-by: Craig Osterhout <craig.osterhout@docker.com>
@netlify
Copy link

netlify bot commented Mar 16, 2026

Deploy Preview for docsdocker ready!

Name Link
🔨 Latest commit f7a2500
🔍 Latest deploy log https://app.netlify.com/projects/docsdocker/deploys/69b88505ba408500078b0496
😎 Deploy Preview https://deploy-preview-24386--docsdocker.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

@docker-agent docker-agent bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

Assessment: 🟢 APPROVE

The changes correctly remove unnecessary user creation steps from the Docker Hardened Image (DHI) Dockerfile example. The dhi.io/static:20250419 base image runs as a nonroot user by default and lacks the adduser package, making the removed code both incorrect and impossible to execute.

Summary

What was changed:

  • Removed adduser command and USER appuser instruction from the DHI Dockerfile example

Why this is correct:

  • DHI static images run as nonroot by default (no manual user creation needed)
  • The static image doesn't include the adduser package (the removed code would fail)
  • This aligns with documented DHI behavior

Documentation quality:

  • No issues introduced by this PR
  • The change improves accuracy by removing incorrect instructions
  • Scope is appropriate (targeted fix, no unnecessary expansion)

Findings

No issues found in the changed code. The PR correctly addresses issue #24362.


Note: One pre-existing formatting issue was observed in the comment at line 119 (broken line with stray # symbols), but this was not introduced by this PR and doesn't block approval.

@craig-osterhout craig-osterhout enabled auto-merge (squash) March 16, 2026 22:42
@craig-osterhout craig-osterhout merged commit 7f71907 into docker:main Mar 17, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Example rust build using DHI fails

2 participants