Selaa lähdekoodia

baidu onedrive mount

orbitzs 3 vuotta sitten
vanhempi
commit
44fbc1d25d

+ 16 - 2
baidu/baidunetdisk_docker/Dockerfile

@@ -1,8 +1,13 @@
-FROM ubuntu:bionic
+FROM ubuntu:focal
+
+
+#RUN printf "deb http://cn.archive.ubuntu.com/ubuntu/ bionic universe" >> /etc/apt/sources.list
+RUN printf "deb http://us.archive.ubuntu.com/ubuntu/ bionic universe" >> /etc/apt/sources.list
 
 RUN apt update && \
     apt install -y libnss3 libgtk-3-0 libx11-xcb1 libxss1 libasound2 desktop-file-utils && \
     apt install -y fonts-droid-fallback && \
+    apt install -y rclone && \
     apt clean && rm -rf /var/lib/apt/lists/*
 
 #ARG BAIDUNETDISK_URL="http://wppkg.baidupcs.com/issue/netdisk/LinuxGuanjia/3.0.1/baidunetdisk_linux_3.0.1.2.deb"
@@ -23,7 +28,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 vim && \
+    export DEBIAN_FRONTEND=noninteractive && apt install -y vnc4server lxde  python3 firefox 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 && \
@@ -33,6 +38,7 @@ RUN apt update && apt install -y wget git && \
     apt remove -y wget git && apt autoremove -y && apt clean && rm -rf /var/lib/apt/lists/*
 
 # COPY vnc /root/.vnc
+COPY fs/autostart /etc/xdg/lxsession/LXDE/autostart
 COPY fs/*.desktop /root/Desktop/
 COPY fs/baidunetdisk.desktop /root/Desktop/
 COPY fs/readme.1st /root/Desktop/
@@ -41,6 +47,14 @@ ARG VNC_PASSWORD=12345678
 COPY xstartup /root/.vnc/
 RUN printf "${VNC_PASSWORD}\n${VNC_PASSWORD}\n\n" | vncpasswd
 
+# RCLONE
+RUN mkdir /root/onedrive
+RUN mkdir /root/.config/ 
+RUN mkdir /root/.config/rclone/ 
+COPY fs/rclone.conf /root/.config/rclone/
+COPY fs/mntone.sh /root/.
+
+
 COPY baidunetdisk_entrypoint.sh /
 ENTRYPOINT ["/baidunetdisk_entrypoint.sh"]
 

+ 59 - 0
baidu/baidunetdisk_docker/Dockerfile.old

@@ -0,0 +1,59 @@
+FROM ubuntu:focal
+
+
+#RUN printf "deb http://cn.archive.ubuntu.com/ubuntu/ bionic universe" >> /etc/apt/sources.list
+RUN printf "deb http://us.archive.ubuntu.com/ubuntu/ bionic universe" >> /etc/apt/sources.list
+
+RUN apt update && \
+    apt install -y libnss3 libgtk-3-0 libx11-xcb1 libxss1 libasound2 desktop-file-utils && \
+    apt install -y fonts-droid-fallback && \
+    apt install -y rclone && \
+    apt clean && rm -rf /var/lib/apt/lists/*
+
+#ARG BAIDUNETDISK_URL="http://wppkg.baidupcs.com/issue/netdisk/LinuxGuanjia/3.0.1/baidunetdisk_linux_3.0.1.2.deb"
+#ARG BAIDUNETDISK_URL="https://issuepcdn.baidupcs.com/issue/netdisk/LinuxGuanjia/4.3.0/baidunetdisk_4.3.0_amd64.deb"
+#RUN apt update && apt install -y  wget && \
+#    cd /tmp && wget $BAIDUNETDISK_URL && dpkg -i baidunetdisk_linux_*.deb && rm baidunetdisk_linux_*.deb && \
+#    apt remove -y wget && apt autoremove -y && apt clean && rm -rf /var/lib/apt/lists/*
+
+
+RUN apt update \
+    && apt install -y --no-install-recommends --allow-unauthenticated \
+    	libnotify4 xdg-utils libsecret-1-0 
+
+COPY fs/baidunetdisk_4.3.0_amd64.deb /tmp/
+RUN cd /tmp && dpkg -i baidunetdisk_4.3.0_amd64.deb && rm baidunetdisk_4.3.0_amd64.deb
+
+
+
+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 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 && \
+    ln -s /usr/bin/python3 /usr/bin/python && \
+    ln -s $NOVNC/vnc.html $NOVNC/index.html && \
+    touch /root/.Xauthority && \
+    apt remove -y wget git && apt autoremove -y && apt clean && rm -rf /var/lib/apt/lists/*
+
+# COPY vnc /root/.vnc
+COPY fs/*.desktop /root/Desktop/
+COPY fs/baidunetdisk.desktop /root/Desktop/
+COPY fs/readme.1st /root/Desktop/
+
+ARG VNC_PASSWORD=12345678
+COPY xstartup /root/.vnc/
+RUN printf "${VNC_PASSWORD}\n${VNC_PASSWORD}\n\n" | vncpasswd
+
+# RCLONE
+RUN mkdir /root/onedrive
+RUN mkdir /root/.config/ 
+RUN mkdir /root/.config/rclone/ 
+COPY fs/rclone.conf /root/.config/rclone/
+COPY fs/mntone.sh /root/.
+
+
+COPY baidunetdisk_entrypoint.sh /
+ENTRYPOINT ["/baidunetdisk_entrypoint.sh"]
+

+ 3 - 1
baidu/baidunetdisk_docker/baidunetdisk_entrypoint.sh

@@ -2,7 +2,7 @@
 
 rm -Rf /tmp/.*
 rm -Rf /tmp/*
-rm /etc/xdg/autostart/xscreensaver.desktop
+#rm /etc/xdg/autostart/xscreensaver.desktop
 
 # TODO: change permission more elegant
 chmod a+rwx /root/baidunetdisk
@@ -16,5 +16,7 @@ echo umask 000 >> /root/.profile
 echo "Access through VNC (5091) or browser (localhost:6080) using password: 12345678."
 DISPLAY=:1 /opt/baidunetdisk/baidunetdisk --no-sandbox 2>&1
 
+
+
 exit 0
 

+ 2 - 0
baidu/baidunetdisk_docker/fs/autostart

@@ -0,0 +1,2 @@
+@lxpanel --profile LXDE
+@pcmanfm --desktop --profile LXDE

+ 2 - 2
baidu/baidunetdisk_docker/fs/xfce4-terminal.desktop → baidu/baidunetdisk_docker/fs/lxterminal.desktop

@@ -1,9 +1,9 @@
 [Desktop Entry]
 Version=1.0
 Type=Application
-Name=xfce4-terminal
+Name=lxterminal
 Comment=
-Exec=xfce4-terminal
+Exec=lxterminal
 Icon=utilities-terminal
 Path=
 Terminal=false

+ 1 - 0
baidu/baidunetdisk_docker/fs/mntone.sh

@@ -0,0 +1 @@
+rclone --vfs-cache-mode writes mount onedrive: ~/onedrive

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 2 - 0
baidu/baidunetdisk_docker/fs/rclone.conf


+ 7 - 1
baidu/baidunetdisk_docker/fs/readme.1st

@@ -1,3 +1,9 @@
 after logged into baidupan, open this link to access folders shared by others.
 
-https://pan.baidu.com/mbox/homepage#share
+https://pan.baidu.com/mbox/homepage#share
+
+
+execute mntone.sh to mount onedrive
+rclone --vfs-cache-mode writes mount onedrive: ~/onedrive
+
+

+ 3 - 1
baidu/baidunetdisk_docker/xstartup

@@ -18,7 +18,9 @@ unsetenv DBUS_SESSION_BUS_ADDRESS
 # http://vstone.eu/2009/04/disabling-xscreensaver-when-using-xfce-vnc/
 setenv VNCSESSION yes
 
-startxfce4 &
+#startxfce4 &
+#startlubuntu &
+startlxde
 
 # Make sure that copy / paste are correctly forwarded to the VNC viewer
 vncconfig -nowin &

+ 8 - 1
baidu/docker-compose.yml

@@ -2,8 +2,15 @@ version: "2.1"
 services:
   baidupan:
 #    image: hubreg.algometic.com/baidupan:0.3
-    image: baidupan:0.3 
+    image: baidupan:0.5 
     container_name: ${CONTAINER_NAME} 
+    cap_add:
+      - SYS_ADMIN
+    privileged: true
+    security_opt:
+      - apparmor:unconfined
+    devices:
+      - /dev/fuse:/dev/fuse:rwm
     volumes:
       - ${BAIDU_USERDAT}/data:/root/baidunetdisk
       - ${BAIDU_DATAPATH}/data:/root/Downloads

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä