Skip to content

Commit

Permalink
attempt to fix sudo user (2)
Browse files Browse the repository at this point in the history
  • Loading branch information
arBmind committed Sep 26, 2023
1 parent e335a03 commit 6208e3d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Expand Up @@ -117,12 +117,12 @@ COPY config/QtCreator.ini /home/${USER}/.config/QtProject/QtCreator.ini

# add user for development
RUN \
mkdir -p /home/${USER} \
&& mkdir -p /build \
&& groupadd -o -g ${GID} ${USER} \
&& useradd -o -d /home/${USER} -s /bin/bash -m ${USER} -u ${UID} -g ${GID} \
if [ "${UID}" = "1000" ] ; then userdel --remove ubuntu ; fi \
&& groupadd --gid ${GID} ${USER} \
&& useradd --create-home --home-dir /home/${USER} --shell /bin/bash ${USER} --uid ${UID} --gid ${GID} \
&& echo "${USER} ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/${USER} \
&& chmod 0440 /etc/sudoers.d/${USER} \
&& mkdir -p /build \
&& chown ${UID}:${GID} -R /home/${USER} /build

WORKDIR /build
Expand Down

0 comments on commit 6208e3d

Please sign in to comment.