set user id to 1000
This commit is contained in:
parent
66884a9bf1
commit
e409c7c848
1 changed files with 2 additions and 2 deletions
|
@ -37,8 +37,8 @@ RUN apt-get update \
|
|||
# Update the package list, install sudo, create a non-root user, and grant password-less sudo permissions
|
||||
# https://dev.to/izackv/running-a-docker-container-with-a-custom-non-root-user-syncing-host-and-container-permissions-26mb
|
||||
# hadolint ignore=DL3008
|
||||
RUN addgroup --gid 2000 nonroot && \
|
||||
adduser --uid 2000 --gid 2000 --disabled-password --gecos "" ansible-dev && \
|
||||
RUN addgroup --gid 1000 ansible-dev && \
|
||||
adduser --uid 1000 --gid 2000 --disabled-password --gecos "" ansible-dev && \
|
||||
echo 'ansible-dev ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
|
||||
|
||||
# Set the non-root user as the default user
|
||||
|
|
Loading…
Reference in a new issue