Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
c31c77a089
4 changed files with 24 additions and 5 deletions
10
Dockerfile
10
Dockerfile
|
@ -46,13 +46,17 @@ ARG TZ="Asia/Shanghai"
|
||||||
ENV TZ ${TZ}
|
ENV TZ ${TZ}
|
||||||
|
|
||||||
COPY --from=be-builder /go/bin/Cloudreve /cloudreve/cloudreve
|
COPY --from=be-builder /go/bin/Cloudreve /cloudreve/cloudreve
|
||||||
|
COPY docker-bootstrap.sh /cloudreve/bootstrap.sh
|
||||||
|
|
||||||
RUN apk upgrade \
|
RUN apk upgrade \
|
||||||
&& apk add bash tzdata \
|
&& apk add bash tzdata aria2 \
|
||||||
&& ln -s /cloudreve/cloudreve /usr/bin/cloudreve \
|
&& ln -s /cloudreve/cloudreve /usr/bin/cloudreve \
|
||||||
&& ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime \
|
&& ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime \
|
||||||
&& echo ${TZ} > /etc/timezone \
|
&& echo ${TZ} > /etc/timezone \
|
||||||
&& rm -rf /var/cache/apk/*
|
&& rm -rf /var/cache/apk/* \
|
||||||
|
&& mkdir /etc/cloudreve \
|
||||||
|
&& ln -s /etc/cloudreve/cloureve.db /cloudreve/cloudreve.db \
|
||||||
|
&& ln -s /etc/cloudreve/conf.ini /cloudreve/conf.ini
|
||||||
|
|
||||||
# cloudreve use tcp 5212 port by default
|
# cloudreve use tcp 5212 port by default
|
||||||
EXPOSE 5212/tcp
|
EXPOSE 5212/tcp
|
||||||
|
@ -65,4 +69,4 @@ VOLUME /etc/cloudreve
|
||||||
|
|
||||||
VOLUME /data
|
VOLUME /data
|
||||||
|
|
||||||
ENTRYPOINT ["cloudreve"]
|
ENTRYPOINT ["sh", "/cloudreve/bootstrap.sh"]
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
|
|
||||||
* :cloud: 支持本机、从机、七牛、阿里云 OSS、腾讯云 COS、又拍云、OneDrive (包括世纪互联版) 作为存储端
|
* :cloud: 支持本机、从机、七牛、阿里云 OSS、腾讯云 COS、又拍云、OneDrive (包括世纪互联版) 作为存储端
|
||||||
* :outbox_tray: 上传/下载 支持客户端直传,支持下载限速
|
* :outbox_tray: 上传/下载 支持客户端直传,支持下载限速
|
||||||
* 💾 可对接 Aria2 离线下载
|
* 💾 可对接 Aria2 离线下载,可使用多个从机机点分担下载任务
|
||||||
* 📚 在线 压缩/解压缩、多文件打包下载
|
* 📚 在线 压缩/解压缩、多文件打包下载
|
||||||
* 💻 覆盖全部存储策略的 WebDAV 协议支持
|
* 💻 覆盖全部存储策略的 WebDAV 协议支持
|
||||||
* :zap: 拖拽上传、目录上传、流式上传处理
|
* :zap: 拖拽上传、目录上传、流式上传处理
|
||||||
|
|
15
docker-bootstrap.sh
Normal file
15
docker-bootstrap.sh
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
#!/bin/sh
|
||||||
|
GREEN='\033[0;32m'
|
||||||
|
RESET='\033[0m'
|
||||||
|
if [ ! -f /etc/cloudreve/aria2c.conf ]; then
|
||||||
|
echo -e "[${GREEN}aria2c${RESET}] aria2c config not found. Generating..."
|
||||||
|
secret=$(tr -dc A-Za-z0-9 </dev/urandom | head -c 13)
|
||||||
|
echo -e "[${GREEN}aria2c${RESET}] Generated port: 6800, secret: $secret"
|
||||||
|
cat <<EOF > /etc/cloudreve/aria2c.conf
|
||||||
|
enable-rpc=true
|
||||||
|
rpc-listen-port=6800
|
||||||
|
rpc-secret=$secret
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
aria2c --conf-path /etc/cloudreve/aria2c.conf -D
|
||||||
|
cloudreve
|
Loading…
Add table
Reference in a new issue