Skip to content

Commit 579c8b3

Browse files
committed
Update Dockerfile
1 parent d7b4223 commit 579c8b3

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

Dockerfile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ FROM fredericklab/basecontainer:latest-release
55
ARG BUILD_TIME
66
ARG BRANCH
77
ARG GITVERSION
8+
ARG GITDIRECTVERSION
89
ARG GITSHA
910
ARG GITDATE
1011

@@ -14,12 +15,14 @@ ENV BRANCH=$BRANCH
1415
ENV GITVERSION=${GITVERSION}
1516
ENV GITSHA=${GITSHA}
1617
ENV GITDATE=${GITDATE}
18+
ENV GITDIRECTVERSION=${GITDIRECTVERSION}
1719

1820
RUN echo "BRANCH: "$BRANCH
1921
RUN echo "BUILD_TIME: "$BUILD_TIME
2022
RUN echo "GITVERSION: "$GITVERSION
2123
RUN echo "GITSHA: "$GITSHA
2224
RUN echo "GITDATE: "$GITDATE
25+
RUN echo "GITDIRECTVERSION: "$GITDIRECTVERSION
2326

2427
# Installing precomputed python packages
2528
RUN uv pip install pillow
@@ -51,19 +54,24 @@ RUN useradd \
5154
--groups users \
5255
--home /home/$USER \
5356
$USER
57+
RUN chown -R $USER /src/$USER
5458
RUN cp ~/.bashrc /home/$USER/.bashrc; chown $USER /home/$USER/.bashrc
5559

5660
WORKDIR /home/$USER
57-
ENV HOME="/home/$USER"
61+
ENV HOME="/home/picachooser"
5862

5963
ENV IN_DOCKER_CONTAINER=1
6064

6165
RUN ldconfig
6266
WORKDIR /tmp/
6367

6468
# set to non-root user and initialize mamba
65-
USER $USER
6669
RUN /opt/miniforge3/bin/mamba init
70+
RUN echo "mamba activate science" >> /home/rapidtide/.bashrc
71+
RUN echo "/opt/miniforge3/bin/mamba activate science" >> /home/rapidtide/.bashrc
72+
73+
# switch to the picachooser user
74+
USER picachooser
6775

6876
ENTRYPOINT ["/opt/miniforge3/envs/science/bin/PICAchooser_dispatcher"]
6977

0 commit comments

Comments
 (0)