Commit 07aff58 LU_ALL_mldevops
committed
1 parent 38aebba commit 07aff58 Copy full SHA for 07aff58
File tree 1 file changed +7
-8
lines changed
1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ RUN apt-get update && apt-get install -y \
17
17
RUN apt-get update && apt-get install -y \
18
18
python3 \
19
19
python3-pip \
20
+ python3.10-venv \
20
21
&& rm -rf /var/lib/apt/lists/*
21
22
22
23
ARG GIT_VERSION=latest
@@ -25,20 +26,18 @@ ARG DOCKER_GID=1001
25
26
ARG DOCKER_UID=12065
26
27
27
28
# Create a user with a specific UID and GID.
28
- RUN addgroup -g ${DOCKER_GID} docker && \
29
- adduser -D -u ${DOCKER_UID} -G docker docker_user
29
+ RUN addgroup --gid ${DOCKER_GID} docker && \
30
+ adduser --uid ${DOCKER_UID} --gid ${DOCKER_GID} --disabled-password --shell /bin/bash --gecos "Docker" docker_user
31
+
32
+ # Install in the virtual environment as the docker user.
33
+ USER docker_user
34
+ WORKDIR /home/docker_user
30
35
31
36
# Create a virtual environment for the application dependencies.
32
37
ENV VIRTUAL_ENV=/home/docker_user/venv
33
38
RUN python3 -m venv $VIRTUAL_ENV
34
39
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
35
40
36
- RUN chown -R docker_user:docker /home/docker_user
37
-
38
- # Install in the virtual environment as the docker user.
39
- USER docker_user
40
- WORKDIR /home/docker_user
41
-
42
41
RUN if [ "$GIT_VERSION" != "latest" ]; then \
43
42
git clone -b v${GIT_VERSION} --depth 1 https://github.com/mbari-org/sdcat.git; \
44
43
else \
You can’t perform that action at this time.
0 commit comments