Skip to content

Commit 7f71907

Browse files
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>
1 parent c835a27 commit 7f71907

1 file changed

Lines changed: 0 additions & 12 deletions

File tree

content/guides/rust/build-images.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -121,18 +121,6 @@ RUN --mount=type=bind,source=src,target=src \
121121

122122
FROM dhi.io/static:20250419 AS final
123123

124-
# Create a non-privileged user that the app will run under.
125-
ARG UID=10001
126-
RUN adduser \
127-
--disabled-password \
128-
--gecos "" \
129-
--home "/nonexistent" \
130-
--shell "/sbin/nologin" \
131-
--no-create-home \
132-
--uid "${UID}" \
133-
appuser
134-
USER appuser
135-
136124
# Copy the executable from the "build" stage.
137125
COPY --from=build /bin/server /bin/
138126

0 commit comments

Comments
 (0)