summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeycatowo <owo.nthu@outlook.com>2024-04-22 11:31:47 +0200
committerKeycatowo <owo.nthu@outlook.com>2024-04-22 11:31:47 +0200
commita795e482adf6ed07070f8f7e772f702ca32d9647 (patch)
tree63a9667466b71852e79a34a5e1e669dca95419e5
parentMerge pull request #1875 from hlohaus/carst (diff)
downloadgpt4free-a795e482adf6ed07070f8f7e772f702ca32d9647.tar
gpt4free-a795e482adf6ed07070f8f7e772f702ca32d9647.tar.gz
gpt4free-a795e482adf6ed07070f8f7e772f702ca32d9647.tar.bz2
gpt4free-a795e482adf6ed07070f8f7e772f702ca32d9647.tar.lz
gpt4free-a795e482adf6ed07070f8f7e772f702ca32d9647.tar.xz
gpt4free-a795e482adf6ed07070f8f7e772f702ca32d9647.tar.zst
gpt4free-a795e482adf6ed07070f8f7e772f702ca32d9647.zip
-rw-r--r--docker/Dockerfile29
1 files changed, 10 insertions, 19 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 7bbe9974..041334a6 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -30,20 +30,13 @@ RUN if [ "$G4F_VERSION" = "" ] ; then \
apt-get -qqy install git \
; fi
-# Python packages
+# Install Python3, pip, remove OpenJDK 11, clean up
RUN apt-get -qqy update \
- && apt-get -qqy install \
- python3 \
- python-is-python3 \
- pip
-
-# Remove java
-RUN apt-get -qyy remove openjdk-11-jre-headless
-
-# Cleanup
-RUN rm -rf /var/lib/apt/lists/* /var/cache/apt/* \
+ && apt-get -qqy install python3 python-is-python3 pip \
+ && apt-get -qyy remove openjdk-11-jre-headless \
&& apt-get -qyy autoremove \
- && apt-get -qyy clean
+ && apt-get -qyy clean \
+ && rm -rf /var/lib/apt/lists/* /var/cache/apt/*
# Update entrypoint
COPY docker/supervisor.conf /etc/supervisor/conf.d/selenium.conf
@@ -57,15 +50,13 @@ RUN if [ "$G4F_NO_GUI" ] ; then \
# Change background image
COPY docker/background.png /usr/share/images/fluxbox/ubuntu-light.png
-# Add user
+# Add user, fix permissions
RUN groupadd -g $G4F_USER_ID $G4F_USER \
&& useradd -rm -G sudo -u $G4F_USER_ID -g $G4F_USER_ID $G4F_USER \
- && echo "${G4F_USER}:${G4F_PASS}" | chpasswd
-
-# Fix permissions
-RUN mkdir "${SE_DOWNLOAD_DIR}"
-RUN chown "${G4F_USER_ID}:${G4F_USER_ID}" $SE_DOWNLOAD_DIR /var/run/supervisor /var/log/supervisor
-RUN chown "${G4F_USER_ID}:${G4F_USER_ID}" -R /opt/bin/ /usr/bin/chromedriver /opt/selenium/
+ && echo "${G4F_USER}:${G4F_PASS}" | chpasswd \
+ && mkdir "${SE_DOWNLOAD_DIR}" \
+ && chown "${G4F_USER_ID}:${G4F_USER_ID}" $SE_DOWNLOAD_DIR /var/run/supervisor /var/log/supervisor \
+ && chown "${G4F_USER_ID}:${G4F_USER_ID}" -R /opt/bin/ /usr/bin/chromedriver /opt/selenium/
# Switch user
USER $G4F_USER_ID