Skip to content

Commit

Permalink
Layer reduziert. User EnvVars angepasst
Browse files Browse the repository at this point in the history
  • Loading branch information
AlvinSchiller committed Oct 16, 2023
1 parent e944675 commit fc1055b
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions ci/Dockerfile.bullseye.test_install_unified.armv7
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,17 @@ RUN touch /boot/cmdlinetxt

# Install packages
RUN apt-get update && \
apt-get -y upgrade && \
apt-get -y install \
apt-utils \
curl \
gnupg

RUN echo 'deb http://raspbian.raspberrypi.org/raspbian/ bullseye main contrib non-free rpi' > /etc/apt/sources.list.d/raspi.list ;\
gnupg ;\
echo 'deb http://raspbian.raspberrypi.org/raspbian/ bullseye main contrib non-free rpi' > /etc/apt/sources.list.d/raspi.list ;\
echo 'deb http://archive.raspberrypi.org/debian/ bullseye main' >> /etc/apt/sources.list.d/raspi.list ;\
curl http://raspbian.raspberrypi.org/raspbian.public.key | apt-key add - ;\
curl http://archive.raspberrypi.org/debian/raspberrypi.gpg.key | apt-key add - ;\
apt-get update && \
apt-get -y upgrade && \
apt-get -y install \
build-essential \
git \
Expand All @@ -36,17 +37,17 @@ ENV TEST_USER_GROUP=test

RUN groupadd --gid 1002 $TEST_USER_GROUP

RUN export USER=pi &&\
export USER_GROUP=$USER &&\
groupadd --gid 1000 $USER_GROUP &&\
useradd -u 1000 -g $USER_GROUP -G sudo,$TEST_USER_GROUP -d /home/$USER -m -s /bin/bash -p '$1$iV7TOwOe$6ojkJQXyEA9bHd/SqNLNj0' $USER &&\
echo "$USER ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/$USER
RUN export USER_PI=pi &&\
export USER_PI_GROUP=$USER_PI &&\
groupadd --gid 1000 $USER_PI_GROUP &&\
useradd -u 1000 -g $USER_PI_GROUP -G sudo,$TEST_USER_PI_GROUP -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

RUN export USER=hans &&\
export USER_GROUP=wurst &&\
groupadd --gid 1001 $USER_GROUP &&\
useradd -u 1001 -g $USER_GROUP -G sudo,$TEST_USER_GROUP -d /home/$USER -m -s /bin/bash -p '$1$iV7TOwOe$6ojkJQXyEA9bHd/SqNLNj0' $USER &&\
echo "$USER ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/$USER
RUN export USER_HANS=hans &&\
export USER_HANS_GROUP=wurst &&\
groupadd --gid 1001 $USER_HANS_GROUP &&\
useradd -u 1001 -g $USER_HANS_GROUP -G sudo,$TEST_USER_HANS_GROUP -d /home/$USER_HANS -m -s /bin/bash -p '$1$iV7TOwOe$6ojkJQXyEA9bHd/SqNLNj0' $USER_HANS &&\
echo "$USER_HANS ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/$USER_HANS


FROM user as test
Expand All @@ -64,4 +65,4 @@ WORKDIR /tests


FROM test as test-update
RUN sudo apt-get update && sudo apt-get -y upgrade
RUN apt-get update && apt-get -y upgrade

0 comments on commit fc1055b

Please sign in to comment.