Update Dockerfile
Browse files- Dockerfile +5 -4
Dockerfile
CHANGED
|
@@ -16,11 +16,12 @@ RUN wget -O cloudreve.tar.gz "https://github.com/cloudreve/Cloudreve/releases/do
|
|
| 16 |
tar -zxvf cloudreve.tar.gz && \
|
| 17 |
rm cloudreve.tar.gz
|
| 18 |
|
| 19 |
-
#
|
|
|
|
| 20 |
ENV VIRTUAL_ENV=/opt/venv
|
| 21 |
-
RUN python3 -m venv $VIRTUAL_ENV
|
| 22 |
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
|
| 23 |
|
|
|
|
| 24 |
RUN pip install --no-cache-dir huggingface_hub cryptography
|
| 25 |
|
| 26 |
# 复制同步脚本
|
|
@@ -32,10 +33,10 @@ RUN chmod +x /opt/cloudreve/sync_data.sh
|
|
| 32 |
# **确保 /opt/cloudreve 目录及其内容有读写执行权限**
|
| 33 |
RUN chmod -R 777 /opt/cloudreve/
|
| 34 |
|
| 35 |
-
#
|
| 36 |
RUN mkdir -p /opt/cloudreve/aria2_downloads && chmod -R 777 /opt/cloudreve/aria2_downloads
|
| 37 |
|
| 38 |
-
#
|
| 39 |
EXPOSE 5212
|
| 40 |
|
| 41 |
# 设置启动命令 to run Cloudreve in foreground and sync script in background, and start aria2
|
|
|
|
| 16 |
tar -zxvf cloudreve.tar.gz && \
|
| 17 |
rm cloudreve.tar.gz
|
| 18 |
|
| 19 |
+
# 创建虚拟环境 (可选, 但推荐)
|
| 20 |
+
RUN python3 -m venv /opt/venv
|
| 21 |
ENV VIRTUAL_ENV=/opt/venv
|
|
|
|
| 22 |
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
|
| 23 |
|
| 24 |
+
# 安装 huggingface_hub
|
| 25 |
RUN pip install --no-cache-dir huggingface_hub cryptography
|
| 26 |
|
| 27 |
# 复制同步脚本
|
|
|
|
| 33 |
# **确保 /opt/cloudreve 目录及其内容有读写执行权限**
|
| 34 |
RUN chmod -R 777 /opt/cloudreve/
|
| 35 |
|
| 36 |
+
# **创建 Aria2 下载目录并设置权限**
|
| 37 |
RUN mkdir -p /opt/cloudreve/aria2_downloads && chmod -R 777 /opt/cloudreve/aria2_downloads
|
| 38 |
|
| 39 |
+
# 暴露 Cloudreve 端口
|
| 40 |
EXPOSE 5212
|
| 41 |
|
| 42 |
# 设置启动命令 to run Cloudreve in foreground and sync script in background, and start aria2
|