Skip to content
Snippets Groups Projects

Fix: Fix for devcontainer

Merged L. Ellenbeck requested to merge dev into master
3 files
+ 10
26
Compare changes
  • Side-by-side
  • Inline

Files

+ 0
15
@@ -5,21 +5,6 @@ ARG USERNAME=vscode
@@ -5,21 +5,6 @@ ARG USERNAME=vscode
ARG USER_UID=1000
ARG USER_UID=1000
ARG USER_GID=$USER_UID
ARG USER_GID=$USER_UID
# Remove any existing user with the same UID (if it's not the specified user)
RUN if id -u $USER_UID >/dev/null 2>&1; then \
existing_user=$(getent passwd $USER_UID | cut -d: -f1); \
if [ "$existing_user" != "$USERNAME" ]; then \
userdel -f $existing_user; \
fi; \
fi
# Change the user's GID and UID
RUN groupmod -g $USER_GID $USERNAME \
&& usermod -u $USER_UID -g $USER_GID $USERNAME
# Change user folder owner and group
RUN chown -R $USER_GID:$USER_GID /home/$USERNAME
# [Optional] Set the default user. Omit if you want to keep the default as root.
# [Optional] Set the default user. Omit if you want to keep the default as root.
USER $USERNAME
USER $USERNAME
Loading