You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.
In the client, create a non-root user and switch to non-root user via UID instead of the user name
FROM ubuntu AS test
ARG NON_ROOT_USER=non_root_user
ARG NON_ROOT_UID=1000
ARG NON_ROOT_GID=100
USER root
# Create non-root userRUN useradd \
--no-log-init \
--no-user-group \
--shell /bin/bash \
--create-home \
--uid ${NON_ROOT_UID} \
--gid ${NON_ROOT_GID} \
${NON_ROOT_USER}
# This works:# USER ${NON_ROOT_USER} # This does not work:USER ${NON_ROOT_UID}
Check the UID of the User within the devcontainer via id. If switching to the non-root user via USER ${NON_ROOT_USER}, you should get the UID of the user from the host. If switching via USER ${NON_ROOT_UID}, the UID will remain at 1000.
The text was updated successfully, but these errors were encountered:
user1584
changed the title
UID is only adapted if non-root user is set using name but not if set via uid.
UID in client is only adapted if switched to non-root via name but not if switched via UID in dockerfile.
Mar 27, 2023
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Steps to Reproduce:
id
. If switching to the non-root user viaUSER ${NON_ROOT_USER}
, you should get the UID of the user from the host. If switching viaUSER ${NON_ROOT_UID}
, the UID will remain at 1000.The text was updated successfully, but these errors were encountered: