XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet
公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/gpt4free

Revert Dockerfile

30465d36
hlohaus <983577+hlohaus@users.noreply.github.com>
提交于

代码差异

1 个文件 +12 -13
Modified docker/Dockerfile +12 -13
@@ -1,11 +1,11 @@
1 FROM browserless/chrome
1 FROM selenium/node-chrome
2 2
3 3 ARG G4F_VERSION
4 4 ENV G4F_VERSION $G4F_VERSION
5 5
6 #ENV SE_SCREEN_WIDTH 1850
6 ENV SE_SCREEN_WIDTH 1850
7 7 ENV G4F_DIR /app
8 #ENV G4F_LOGIN_URL http://localhost:7900/?autoconnect=1&resize=scale&password=secret
8 ENV G4F_LOGIN_URL http://localhost:7900/?autoconnect=1&resize=scale&password=secret
9 9
10 10 USER root
11 11
@@ -26,17 +26,17 @@ RUN apt-get -qqy update \
26 26 && rm -rf /var/lib/apt/lists/* /var/cache/apt/*
27 27
28 28 # Update entrypoint
29 #COPY docker/supervisor.conf /etc/supervisor/conf.d/selenium.conf
30 #COPY docker/supervisor-api.conf /etc/supervisor/conf.d/api.conf
29 COPY docker/supervisor.conf /etc/supervisor/conf.d/selenium.conf
30 COPY docker/supervisor-api.conf /etc/supervisor/conf.d/api.conf
31 31
32 32 # Change background image
33 #COPY docker/background.png /usr/share/images/fluxbox/ubuntu-light.png
33 COPY docker/background.png /usr/share/images/fluxbox/ubuntu-light.png
34 34
35 35 # Add user, fix permissions
36 #RUN chown "${SEL_UID}:${SEL_GID}" $HOME/.local /opt/venv/share
36 RUN chown "${SEL_UID}:${SEL_GID}" $HOME/.local /opt/venv/share
37 37
38 38 # Switch user
39 USER $BLESS_USER_ID
39 USER $SEL_UID
40 40
41 41 # Set the working directory in the container.
42 42 WORKDIR $G4F_DIR
@@ -45,12 +45,11 @@ WORKDIR $G4F_DIR
45 45 COPY requirements.txt $G4F_DIR
46 46
47 47 # Upgrade pip for the latest features and install the project's Python dependencies.
48 RUN pip install -r requirements.txt
48 RUN pip install --break-system-packages --upgrade pip \
49 && pip install --break-system-packages -r requirements.txt
49 50
50 51 # Copy the entire package into the container.
51 ADD --chown=$BLESS_USER_ID:$BLESS_USER_ID g4f $G4F_DIR/g4f
52 ADD --chown=$SEL_UID:$SEL_GID g4f $G4F_DIR/g4f
52 53
53 54 # Expose ports
54 EXPOSE 8080
55
56 CMD ./scripts/start.sh & python3 -m g4f --port=8080 --debug
55 EXPOSE 8080 7900