mirror of
https://github.com/docker/docs.git
synced 2026-03-27 06:18:55 +07:00
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:
@@ -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/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user