guides: update rust guide (#24386)

<!--Delete sections as needed -->

## 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

<!-- Notes for reviewers here -->
<!-- List applicable reviews (optionally @tag reviewers) -->

- [ ] Editorial review

Signed-off-by: Craig Osterhout <craig.osterhout@docker.com>
This commit is contained in:
Craig Osterhout
2026-03-17 01:30:17 -07:00
committed by GitHub
parent c835a2794d
commit 7f71907d36

View File

@@ -121,18 +121,6 @@ RUN --mount=type=bind,source=src,target=src \
FROM dhi.io/static:20250419 AS final
# Create a non-privileged user that the app will run under.
ARG UID=10001
RUN adduser \
--disabled-password \
--gecos "" \
--home "/nonexistent" \
--shell "/sbin/nologin" \
--no-create-home \
--uid "${UID}" \
appuser
USER appuser
# Copy the executable from the "build" stage.
COPY --from=build /bin/server /bin/