Browse Source

handle server restart of baidu container

orbitzs 3 years ago
parent
commit
b13c1319b5

+ 1 - 1
baidu/baidunetdisk_docker/Dockerfile

@@ -23,7 +23,7 @@ RUN cd /tmp && dpkg -i baidunetdisk_4.3.0_amd64.deb && rm baidunetdisk_4.3.0_amd
 
 ARG NOVNC=/opt/noVNC
 RUN apt update && apt install -y wget git && \
-    export DEBIAN_FRONTEND=noninteractive && apt install -y vnc4server xfce4 python3 firefox xfce4-terminal mousepad && \
+    export DEBIAN_FRONTEND=noninteractive && apt install -y vnc4server xfce4 python3 firefox xfce4-terminal mousepad vim && \
     git clone --depth 1 https://github.com/novnc/noVNC.git $NOVNC && \
     git clone --depth 1 https://github.com/novnc/websockify.git $NOVNC/utils/websockify && \
     find ${NOVNC} -name ".git*" | xargs rm -rf && \

+ 7 - 2
baidu/baidunetdisk_docker/baidunetdisk_entrypoint.sh

@@ -1,15 +1,20 @@
 #!/bin/sh
 
+rm -Rf /tmp/.*
+rm -Rf /tmp/*
+rm /etc/xdg/autostart/xscreensaver.desktop
+
 # TODO: change permission more elegant
 chmod a+rwx /root/baidunetdisk
 #chmod a+rwx /root/baidunetdiskdownload
-#chmod a+rwx /root/Downloads
+chmod a+rwx /root/Downloads
+echo umask 000 >> /root/.bashrc
+echo umask 000 >> /root/.profile
 
 /usr/bin/vncserver -geometry 1600x1200 2>&1
 /opt/noVNC/utils/novnc_proxy --vnc localhost:5901 2>&1 &
 echo "Access through VNC (5091) or browser (localhost:6080) using password: 12345678."
 DISPLAY=:1 /opt/baidunetdisk/baidunetdisk --no-sandbox 2>&1
-#DISPLAY=:1 /opt/baidunetdisk/baidunetdisk --type=renderer --no-sandbox --enable-features=WebComponentsV0Enabled --disable-features=SpareRendererForSitePerProcess --lang=en-US --app-path=/opt/baidunetdisk/resources/app.asar --node-integration --node-integration-in-worker --webview-tag --no-sandbox --no-zygote --enable-remote-module --background-color=#F6F6F6 --enable-spellcheck --enable-websql --num-raster-threads=4 --enable-main-frame-before-activation --renderer-client-id=5 --no-v8-untrusted-code-mitigations --shared-files=v8_snapshot_data:100 2>&1
 
 exit 0
 

+ 2 - 2
baidu/docker-compose.yml

@@ -1,8 +1,8 @@
 version: "2.1"
 services:
   baidupan:
-    image: hubreg.algometic.com/baidupan:0.2 
-#    image: baidupan:0.2 
+#    image: hubreg.algometic.com/baidupan:0.3
+    image: baidupan:0.3 
     container_name: ${CONTAINER_NAME} 
     volumes:
       - ${BAIDU_USERDAT}/data:/root/baidunetdisk