cys003 commited on
Commit
d358b76
·
verified ·
1 Parent(s): 5b304f3

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -14
Dockerfile CHANGED
@@ -1,6 +1,6 @@
1
  FROM lscr.io/linuxserver/chromium:latest
2
 
3
- # 安装 python3 + pip + huggingface_hub(Ubuntu/Debian 版)
4
  RUN apt-get update && \
5
  apt-get install -y --no-install-recommends python3 python3-pip && \
6
  pip3 install --no-cache-dir huggingface_hub && \
@@ -14,18 +14,11 @@ RUN chmod +x /usr/local/bin/sync.py
14
  ENV PUID=1000
15
  ENV PGID=1000
16
  ENV TZ=Asia/Shanghai
17
- ENV CHROMIUM_FLAGS="--no-sandbox --disable-dev-shm-usage"
18
  ENV CUSTOM_PORT=3000
19
 
20
- # 启动命令(单行兼容 linuxserver/s6-overlay)
21
- ENTRYPOINT /bin/sh -c "\
22
- mkdir -p /config /config/log && \
23
- chmod -R 777 /config && \
24
- rm -f /config/*.lock /config/Singleton* 2>/dev/null || true && \
25
- python3 /usr/local/bin/sync.py restore && \
26
- echo '=== 定时备份已启动(每5分钟一次) ===' && \
27
- while true; do \
28
- python3 /usr/local/bin/sync.py backup; \
29
- sleep 300; \
30
- done & \
31
- exec /init"
 
1
  FROM lscr.io/linuxserver/chromium:latest
2
 
3
+ # 安装必要工具
4
  RUN apt-get update && \
5
  apt-get install -y --no-install-recommends python3 python3-pip && \
6
  pip3 install --no-cache-dir huggingface_hub && \
 
14
  ENV PUID=1000
15
  ENV PGID=1000
16
  ENV TZ=Asia/Shanghai
17
+ ENV CHROMIUM_FLAGS="--no-sandbox --disable-dev-shm-usage --disable-gpu"
18
  ENV CUSTOM_PORT=3000
19
 
20
+ # 正确写法:把 restore 和备份循环写成独立的脚本避免 s6 报错
21
+ COPY entrypoint.sh /entrypoint.sh
22
+ RUN chmod +x /entrypoint.sh
23
+
24
+ ENTRYPOINT ["/entrypoint.sh"]