Update container user config

This commit is contained in:
Emmanuel Engelhart 2023-02-10 11:25:00 +01:00 committed by Kelson
parent f16f55fd07
commit 672c6fdcb5
4 changed files with 15 additions and 15 deletions

View File

@ -15,9 +15,9 @@ RUN apk update -q \
gtest-dev
# Create user
RUN adduser -h /home/runner -D runner
RUN addgroup --gid 121 runner
RUN adduser -u 1001 -G runner -h /home/runner -D runner
USER runner
WORKDIR /home/runner
ENV PATH /home/runner/.local/bin:$PATH
RUN pip3 install meson ninja ; \
ln -s /usr/bin/python3 .local/bin/python
ln -s /usr/bin/python3 /home/runner/.local/bin/python

View File

@ -32,14 +32,14 @@ RUN apt update -q \
&& rm -rf /var/lib/apt/lists/* /usr/share/doc/* /var/cache/debconf/* \
&& pip3 install meson pytest gcovr requests distro
# Create user
RUN useradd --create-home runner
USER runner
WORKDIR /home/runner
ENV PATH /home/runner/.local/bin:$PATH
# Set qt515 environment (the equivalent of "source /opt/qt515/bin/qt515-env.sh")
# RUN echo "source /opt/qt515/bin/qt515-env.sh" >> /home/runner/.bashrc
ENV PATH=/opt/qt515/bin:$PATH \
LD_LIBRARY_PATH=/opt/qt515/lib/x86_64-linux-gnu:/opt/qt515/lib:$LD_LIBRARY_PATH \
PKG_CONFIG_PATH=/opt/qt515/lib/pkgconfig:$PKG_CONFIG_PATH
# Create user
RUN groupadd --gid 121 runner
RUN useradd --uid 1001 --gid 121 --create-home runner
USER runner
ENV PATH /home/runner/.local/bin:$PATH

View File

@ -22,7 +22,7 @@ RUN dnf install -y --nodocs \
&& pip3 install meson pytest requests distro
# Create user
RUN useradd --create-home runner
RUN groupadd --gid 121 runner
RUN useradd --uid 1001 --gid 121 --create-home runner
USER runner
WORKDIR /home/runner
ENV PATH /home/runner/.local/bin:$PATH
ENV PATH /home/runner/.local/bin:$PATH

View File

@ -28,7 +28,7 @@ RUN apt update -q \
&& pip3 install meson pytest gcovr requests distro
# Create user
RUN useradd --create-home runner
RUN groupadd --gid 121 runner
RUN useradd --uid 1001 --gid 121 --create-home runner
USER runner
WORKDIR /home/runner
ENV PATH /home/runner/.local/bin:$PATH
ENV PATH /home/runner/.local/bin:$PATH