set user id to 1000
Some checks failed
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/build Pipeline failed

This commit is contained in:
Michael Grote 2024-07-30 11:18:05 +02:00
parent 66884a9bf1
commit e409c7c848

View file

@ -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