summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH Lohaus <hlohaus@users.noreply.github.com>2023-12-14 18:37:07 +0100
committerGitHub <noreply@github.com>2023-12-14 18:37:07 +0100
commitb633ab0031213e1fef9d5079c89c1251e5e48245 (patch)
treeb4b3e69a7bf01978f0ca8fb6be05a0fac931876f
parentMerge pull request #1344 from alvarosoaress/api-providers (diff)
downloadgpt4free-b633ab0031213e1fef9d5079c89c1251e5e48245.tar
gpt4free-b633ab0031213e1fef9d5079c89c1251e5e48245.tar.gz
gpt4free-b633ab0031213e1fef9d5079c89c1251e5e48245.tar.bz2
gpt4free-b633ab0031213e1fef9d5079c89c1251e5e48245.tar.lz
gpt4free-b633ab0031213e1fef9d5079c89c1251e5e48245.tar.xz
gpt4free-b633ab0031213e1fef9d5079c89c1251e5e48245.tar.zst
gpt4free-b633ab0031213e1fef9d5079c89c1251e5e48245.zip
-rw-r--r--docker/Dockerfile11
1 files changed, 2 insertions, 9 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile
index d160fcac..94886ff5 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -6,13 +6,8 @@ ENV G4F_DIR /app
ENV G4F_LOGIN_URL http://localhost:7900/?autoconnect=1&resize=scale&password=secret
ARG G4F_VERSION
ENV G4F_VERSION ${G4F_VERSION}
-ARG G4F_USER
-ENV G4F_USER ${G4F_USER:-g4f}
-ARG G4F_USER_ID
-ENV G4F_USER_ID ${G4F_USER_ID:-1000}
ARG G4F_NO_GUI
ENV G4F_NO_GUI ${G4F_NO_GUI}
-ENV HOME /home/$G4F_USER
USER root
@@ -47,9 +42,7 @@ RUN if [ "$G4F_NO_GUI" ] ; then \
COPY docker/background.png /usr/share/images/fluxbox/ubuntu-light.png
# Switch user
-RUN groupadd -g $G4F_USER_ID $G4F_USER
-RUN useradd -rm -G sudo -u $G4F_USER_ID -g $G4F_USER_ID $G4F_USER
-USER $G4F_USER_ID
+USER $SEL_USER
# Set the working directory in the container.
WORKDIR $G4F_DIR
@@ -61,7 +54,7 @@ COPY requirements.txt $G4F_DIR
RUN pip install --upgrade pip && pip install -r requirements.txt
# Copy the entire package into the container.
-ADD --chown=$G4F_USER g4f $G4F_DIR/
+ADD --chown=$SEL_USER:$SEL_GROUP g4f $G4F_DIR/
# Expose ports
EXPOSE 8080 1337 \ No newline at end of file