Skip to content

Commit

Permalink
Add user precice again to fix dockerfile. See #191.
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminRodenberg committed Feb 13, 2024
1 parent 6de8993 commit ad3c672
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions tools/releasing/packaging/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit ad3c672

Please sign in to comment.