Skip to content

Commit

Permalink
Merge pull request #1076 from trws/fix-arm-nosetuid
Browse files Browse the repository at this point in the history
docker: avoid sudo in Dockerfile for arm runner
  • Loading branch information
mergify[bot] authored Sep 17, 2023
2 parents 021d180 + c3ba131 commit f1e77a5
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/test/docker/bookworm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ FROM fluxrm/flux-core:bookworm

ARG USER=flux
ARG UID=1000
USER root

# Install extra buildrequires for flux-sched:
RUN sudo apt-get update
RUN sudo apt-get -qq install -y --no-install-recommends \
RUN apt-get update
RUN apt-get -qq install -y --no-install-recommends \
libboost-graph-dev \
libboost-system-dev \
libboost-filesystem-dev \
Expand All @@ -19,10 +20,10 @@ RUN sudo apt-get -qq install -y --no-install-recommends \
#
RUN \
if test "$USER" != "flux"; then \
sudo groupadd -g $UID $USER \
&& sudo useradd -g $USER -u $UID -d /home/$USER -m $USER \
&& sudo sh -c "printf \"$USER ALL= NOPASSWD: ALL\\n\" >> /etc/sudoers" \
&& sudo adduser $USER sudo ; \
groupadd -g $UID $USER \
&& useradd -g $USER -u $UID -d /home/$USER -m $USER \
&& sh -c "printf \"$USER ALL= NOPASSWD: ALL\\n\" >> /etc/sudoers" \
&& adduser $USER sudo ; \
fi

USER $USER
Expand Down

0 comments on commit f1e77a5

Please sign in to comment.