From 53f868b795de8791b44d153643b526ed93b5fc0f Mon Sep 17 00:00:00 2001 From: darlexlin Date: Thu, 13 May 2021 22:24:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E6=BB=9A=E8=87=B3=E5=8F=AF=E7=94=A8?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 6 +----- root/etc/cont-init.d/20-config | 14 ++++++-------- root/etc/cont-init.d/90-seafile | 8 ++++---- 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/Dockerfile b/Dockerfile index 712d80d..17c6ad5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,11 +17,7 @@ RUN apt update -y && \ apt clean # 初始化 -RUN seaf-cli init -d /app -c /app/ccnet && \ - chown abc:abc -R /app && \ - ln -s /app/ccnet /config/.ccnet && \ - chown abc:abc -R /config && \ - ln -s /app/ccnet /root/.ccnet +RUN seaf-cli init -d /app -c /app/ccnet # 数据目录 WORKDIR /sf diff --git a/root/etc/cont-init.d/20-config b/root/etc/cont-init.d/20-config index a8e79e1..9f14c02 100644 --- a/root/etc/cont-init.d/20-config +++ b/root/etc/cont-init.d/20-config @@ -8,11 +8,9 @@ # 配置权限,sf为数据目录,app为配置目录 # 此配置全部注释掉,开启此配置会在容器生成后或重启后,均会全部遍历一遍更改文件权限,导致启动或重启很慢 # 遍历过一次权限后,后续生成的文件不存在权限问题,所以考虑关掉此配置 -#chown -R abc:abc \ -# /app/ccnet \ -# /config -#chmod -R g+w \ -# /app/ccnet \ -# /config - -echo "20-config start" +chown -R abc:abc \ + /app \ + /config +chmod -R g+w \ + /app \ + /config diff --git a/root/etc/cont-init.d/90-seafile b/root/etc/cont-init.d/90-seafile index 196151c..c5ea9cc 100644 --- a/root/etc/cont-init.d/90-seafile +++ b/root/etc/cont-init.d/90-seafile @@ -2,11 +2,11 @@ # 映射配置目录 # 第一条用于容器启动时直接读取ccnet配置 -#[[ $(find /config/.ccnet/ -type f | wc -l) -eq 0 ]] && \ -# ln -s /app/ccnet /config/.ccnet +[[ $(find /config/.ccnet/ -type f | wc -l) -eq 0 ]] && \ + ln -s /app/ccnet /config/.ccnet # 第二条用于后台使用时直接查看状态 -#[[ $(find /root/.ccnet/ -type f | wc -l) -eq 0 ]] && \ -# ln -s /app/ccnet /root/.ccnet +[[ $(find /root/.ccnet/ -type f | wc -l) -eq 0 ]] && \ + ln -s /app/ccnet /root/.ccnet # 输出当前时间 echo "-------------------------------------"