From ad3c672ff4f83e92700fbd564fd027d13cb2d454 Mon Sep 17 00:00:00 2001 From: Benjamin Rodenberg Date: Tue, 13 Feb 2024 09:47:10 +0100 Subject: [PATCH] Add user precice again to fix dockerfile. See #191. --- tools/releasing/packaging/docker/Dockerfile | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/tools/releasing/packaging/docker/Dockerfile b/tools/releasing/packaging/docker/Dockerfile index 6eb6254c..ef048766 100644 --- a/tools/releasing/packaging/docker/Dockerfile +++ b/tools/releasing/packaging/docker/Dockerfile @@ -16,15 +16,15 @@ RUN apt-get -qq update && apt-get -qq install \ pkg-config && \ rm -rf /var/lib/apt/lists/* -## Needed, if base image does not create a user? See also https://github.com/precice/precice/pull/1090 -## At the moment: precice/precice:latest does not create a user, but benjaminrodenberg/precice:develop creates a user +## Needed, because precice/precice:latest does not create a user? See also https://github.com/precice/precice/pull/1090, https://github.com/precice/python-bindings/issues/191 ## ------> # Create user precice -# ARG uid=1000 -# ARG gid=1000 -# RUN groupadd -g ${gid} precice \ -# && useradd -u ${uid} -g ${gid} -m -s /bin/bash precice \ -# && sudo usermod -a -G sudo precice +ARG uid=1000 +ARG gid=1000 +RUN groupadd -g ${gid} precice \ + && useradd -u ${uid} -g ${gid} -m -s /bin/bash precice \ + && sudo usermod -a -G sudo precice +## <----- # Setup passwordless sudo RUN echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers @@ -36,7 +36,6 @@ ENV USER=precice # Use bash instead of default sh SHELL ["/bin/bash", "-c"] -## <----- # Upgrade pip to newest version (pip version from 18.04 apt-get is outdated) RUN python3 -m pip install --user --upgrade pip