Skip to content

Commit e52756e

Browse files
committed
Run dvuploader under dvtools:dpgdil
1 parent e602d3e commit e52756e

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

Dockerfile

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,24 @@
11
FROM python:3.13-slim
22
WORKDIR /opt/app
33

4+
ENV APP_USER=dvtools
5+
ENV APP_UID=40088
6+
7+
ENV APP_GROUP=dpgdil
8+
ENV APP_GID=105
9+
10+
RUN groupadd --system --gid $APP_UID $APP_USER \
11+
&& groupadd --system --gid $APP_GID $APP_GROUP \
12+
&& useradd --home-dir /opt/app --system --uid $APP_UID --gid $APP_USER -G $APP_GROUP $APP_USER
13+
14+
RUN chown -R $APP_USER:$APP_USER /opt/app
15+
16+
USER $APP_USER:$APP_GROUP
17+
418
# Install python-dvuploader dependencies
5-
COPY requirements.txt .
19+
COPY --chown=$APP_USER requirements.txt .
620
RUN pip install -r requirements.txt
721

8-
ENTRYPOINT [ "dvuploader" ]
22+
ENV PATH="/opt/app/.local/bin:$PATH"
23+
24+
ENTRYPOINT [ "dvuploader" ]

0 commit comments

Comments
 (0)