File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,8 @@ LABEL org.opencontainers.image.licenses="Apache-2.0"
28
28
29
29
ENV APP_NAME scancodeio
30
30
ENV APP_USER app
31
+ ENV APP_UID=1000
32
+ ENV APP_GID=1000
31
33
ENV APP_DIR /opt/$APP_NAME
32
34
ENV VENV_LOCATION /opt/$APP_NAME/.venv
33
35
@@ -64,9 +66,9 @@ RUN apt-get update \
64
66
&& apt-get clean \
65
67
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
66
68
67
- # Create the APP_USER group and user
68
- RUN addgroup --system $APP_USER \
69
- && adduser --system --group --home= $APP_DIR $APP_USER \
69
+ # Create the APP_USER group and user with specific UID and GID
70
+ RUN groupadd --gid $APP_GID $APP_USER \
71
+ && useradd --uid $APP_UID --gid $APP_GID --home-dir $APP_DIR --create-home $APP_USER \
70
72
&& chown $APP_USER:$APP_USER $APP_DIR
71
73
72
74
# Create the /var/APP_NAME directory with proper permission for APP_USER
You can’t perform that action at this time.
0 commit comments