add UID&GID support to Dockerfile
This commit is contained in:
parent
a4c68ca9e2
commit
6a64a943b1
1 changed files with 6 additions and 2 deletions
|
|
@ -1,5 +1,8 @@
|
|||
FROM python:3.9-bullseye
|
||||
|
||||
ARG UID=1000
|
||||
ARG GID=1000
|
||||
|
||||
# ENV setup
|
||||
RUN ["python","--version"]
|
||||
RUN ["apt-get", "update"]
|
||||
|
|
@ -11,7 +14,8 @@ RUN ["pip", "install", "firebase_admin"]
|
|||
RUN ["pip", "install", "pycryptodome"]
|
||||
RUN ["pip", "install", "watchdog"]
|
||||
|
||||
RUN adduser --system --no-create-home flask
|
||||
RUN groupadd -g $GID -o flask
|
||||
RUN adduser -u $UID -g $GID --no-create-home flask
|
||||
USER flask
|
||||
|
||||
WORKDIR /home/flask/server
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue