Skip to content

Commit

Permalink
fix systemd init vars
Browse files Browse the repository at this point in the history
  • Loading branch information
AlvinSchiller committed Nov 15, 2023
1 parent 8b43c54 commit d8c899e
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions ci/ci-debian.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,14 @@ ARG USER_GROUP=$USER

ENV USER=$USER USER_GROUP=$USER_GROUP

RUN export USER_ID=1000 \
&& groupadd --gid 1000 $USER_GROUP \
&& useradd -u $USER_ID -g $USER_GROUP -G sudo -d /home/$USER -m -s /bin/bash -p '$1$iV7TOwOe$6ojkJQXyEA9bHd/SqNLNj0' $USER \
&& echo "$USER ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/$USER \
&& echo "export XDG_RUNTIME_DIR=\"/run/user/$USER_ID\"" >> /home/$USER/.profile \
&& echo "export DBUS_SESSION_BUS_ADDRESS=\"unix:path=/run/user/$USER_ID/bus\"" >> /home/$USER/.profile
RUN export USER_PI=$USER \
&& export USER_PI_GROUP=$USER_GROUP \
&& export USER_PI_ID=1000 \
&& groupadd --gid 1000 $USER_PI_GROUP \
&& useradd -u $USER_PI_ID -g $USER_PI_GROUP -G sudo -d /home/$USER_PI -m -s /bin/bash -p '$1$iV7TOwOe$6ojkJQXyEA9bHd/SqNLNj0' $USER_PI \
&& echo "$USER_PI ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/$USER_PI \
&& echo "export XDG_RUNTIME_DIR=\"/run/user/$USER_PI_ID\"" >> /home/$USER_PI/.profile \
&& echo "export DBUS_SESSION_BUS_ADDRESS=\"unix:path=/run/user/$USER_PI_ID/bus\"" >> /home/$USER_PI/.profile
# ------


Expand All @@ -67,12 +69,12 @@ RUN groupadd --gid 1002 $TEST_USER_GROUP \

RUN export USER_ALT=hans \
&& export USER_ALT_GROUP=wurst \
&& export USER_ID=1001 \
&& export USER_ALT_ID=1001 \
&& groupadd --gid 1001 $USER_ALT_GROUP \
&& useradd -u $USER_ID -g $USER_ALT_GROUP -G sudo,$TEST_USER_GROUP -d /home/$USER_ALT -m -s /bin/bash -p '$1$iV7TOwOe$6ojkJQXyEA9bHd/SqNLNj0' $USER_ALT \
&& useradd -u $USER_ALT_ID -g $USER_ALT_GROUP -G sudo,$TEST_USER_GROUP -d /home/$USER_ALT -m -s /bin/bash -p '$1$iV7TOwOe$6ojkJQXyEA9bHd/SqNLNj0' $USER_ALT \
&& echo "$USER_ALT ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/$USER_ALT \
&& echo "export XDG_RUNTIME_DIR=\"/run/user/$USER_ID\"" >> /home/$USER/.profile \
&& echo "export DBUS_SESSION_BUS_ADDRESS=\"unix:path=/run/user/$USER_ID/bus\"" >> /home/$USER/.profile \
&& echo "export XDG_RUNTIME_DIR=\"/run/user/$USER_ALT_ID\"" >> /home/$USER_ALT/.profile \
&& echo "export DBUS_SESSION_BUS_ADDRESS=\"unix:path=/run/user/$USER_ALT_ID/bus\"" >> /home/$USER_ALT/.profile \
&& cat /home/$USER/.profile
# ------

Expand Down

0 comments on commit d8c899e

Please sign in to comment.