File tree Expand file tree Collapse file tree 2 files changed +46
-0
lines changed
Expand file tree Collapse file tree 2 files changed +46
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,29 @@ LABEL maintainer="James Gebbie-Rayet <james.gebbie@stfc.ac.uk>"
55ARG AIIDAVERSION=2.6.1
66ARG AMBERTOOLSVERSION=24.8
77ARG PYTHONVERSION=3.11
8+ ARG NEW_MAMBA_USER=aiida
9+ ARG NEW_MAMBA_USER_ID=1001
10+ ARG NEW_MAMBA_USER_GID=121
11+ USER root
12+
13+ RUN if grep -q '^ID=alpine$' /etc/os-release; then \
14+ # alpine does not have usermod/groupmod
15+ apk add --no-cache --virtual temp-packages shadow; \
16+ fi && \
17+ usermod "--login=${NEW_MAMBA_USER}" "--home=/home/${NEW_MAMBA_USER}" \
18+ --move-home "-u ${NEW_MAMBA_USER_ID}" "${MAMBA_USER}" && \
19+ groupmod "--new-name=${NEW_MAMBA_USER}" \
20+ "-g ${NEW_MAMBA_USER_GID}" "${MAMBA_USER}" && \
21+ if grep -q '^ID=alpine$' /etc/os-release; then \
22+ # remove the packages that were only needed for usermod/groupmod
23+ apk del temp-packages; \
24+ fi && \
25+ # Update the expected value of MAMBA_USER for the
26+ # _entrypoint.sh consistency check.
27+ echo "${NEW_MAMBA_USER}" > "/etc/arg_mamba_user" && \
28+ :
29+ ENV MAMBA_USER=$NEW_MAMBA_USER
30+ USER $MAMBA_USER
831
932# Install dependencies
1033RUN micromamba install -c conda-forge python=$PYTHONVERSION aiida-core=$AIIDAVERSION ambertools=$AMBERTOOLSVERSION && \
Original file line number Diff line number Diff line change @@ -5,6 +5,29 @@ LABEL maintainer="James Gebbie-Rayet <james.gebbie@stfc.ac.uk>"
55ARG AIIDAVERSION=2.6.1
66ARG GMXVERSION=2025.4
77ARG PYTHONVERSION=3.11
8+ ARG NEW_MAMBA_USER=aiida
9+ ARG NEW_MAMBA_USER_ID=1001
10+ ARG NEW_MAMBA_USER_GID=121
11+ USER root
12+
13+ RUN if grep -q '^ID=alpine$' /etc/os-release; then \
14+ # alpine does not have usermod/groupmod
15+ apk add --no-cache --virtual temp-packages shadow; \
16+ fi && \
17+ usermod "--login=${NEW_MAMBA_USER}" "--home=/home/${NEW_MAMBA_USER}" \
18+ --move-home "-u ${NEW_MAMBA_USER_ID}" "${MAMBA_USER}" && \
19+ groupmod "--new-name=${NEW_MAMBA_USER}" \
20+ "-g ${NEW_MAMBA_USER_GID}" "${MAMBA_USER}" && \
21+ if grep -q '^ID=alpine$' /etc/os-release; then \
22+ # remove the packages that were only needed for usermod/groupmod
23+ apk del temp-packages; \
24+ fi && \
25+ # Update the expected value of MAMBA_USER for the
26+ # _entrypoint.sh consistency check.
27+ echo "${NEW_MAMBA_USER}" > "/etc/arg_mamba_user" && \
28+ :
29+ ENV MAMBA_USER=$NEW_MAMBA_USER
30+ USER $MAMBA_USER
831
932# Install dependencies
1033RUN micromamba install -c conda-forge python=$PYTHONVERSION aiida-core=$AIIDAVERSION gromacs=$GMXVERSION && \
You can’t perform that action at this time.
0 commit comments