Update Dockerfile
Browse files- Dockerfile +7 -14
Dockerfile
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 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,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 |
-
#
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 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"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|