diff --git a/Dockerfile b/Dockerfile index 103850d9..7a3425b1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,35 +5,9 @@ WORKDIR /app ENV DEBIAN_FRONTEND=noninteractive -RUN apt-get update && \ - apt install software-properties-common apt-transport-https wget ca-certificates gnupg2 -yq && \ - wget -qO /usr/share/keyrings/xpra-2022.gpg https://xpra.org/xpra-2022.gpg && \ - echo deb [arch=amd64,arm64 signed-by=/usr/share/keyrings/xpra-2022.gpg] https://xpra.org/ bullseye main | tee /etc/apt/sources.list.d/xpra.list && \ - wget -O- /usr/share/keyrings/google-chrome.gpg https://dl.google.com/linux/linux_signing_key.pub | gpg --dearmor --yes -o /usr/share/keyrings/google-chrome.gpg && \ - echo deb [arch=amd64,arm64 signed-by=/usr/share/keyrings/google-chrome.gpg] http://dl.google.com/linux/chrome/deb/ stable main | tee -a /etc/apt/sources.list.d/google-chrome.list && \ - apt-get update && \ - apt install --no-install-recommends xpra xvfb libgl1-mesa-dri xauth google-chrome-stable xterm -yq - - -RUN set -eux; \ - apt-get clean; \ - apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - rm -rf /var/lib/apt/lists/* - COPY requirements.txt /app RUN pip install -r requirements.txt COPY . /app -# Copy xpra config file -COPY ./docker/xpra.conf /etc/xpra/xpra.conf - -# Set default xpra password -ENV XPRA_PASSWORD password - -# Expose xpra HTML5 client port -EXPOSE 14500 - -CMD ["/bin/bash", "/app/docker/start.sh"] - -RUN ln -sf /proc/1/fd/1 /tmp/log.txt \ No newline at end of file +CMD ["/bin/bash", "/app/docker/start.sh"] \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml index 0e334354..a05a0a6f 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -17,9 +17,9 @@ services: restart: always environment: LANG: 'C.UTF-8' - XPRA_PASSWORD: 'lss233' # XPRA 密码,建议修改 ports: - 14500:14500 volumes: - ./config.json:/app/config.json # - ./fonts:/app/fonts # 如果你想自定义字体,就解除注释 + # - ./presets:/app/presets # 如果你想自定义预设,就解除注释 diff --git a/docker/start.sh b/docker/start.sh index 8927bd9f..41d53353 100644 --- a/docker/start.sh +++ b/docker/start.sh @@ -1,4 +1,4 @@ #!/bin/bash cd /app -xpra start --no-daemon --html=on --start-child="xterm -e 'python bot.py 2>&1 | tee /tmp/log.txt'" --exit-with-children \ No newline at end of file +python bot.py \ No newline at end of file