image installation
pull mirror
1 | sudo docker pull b3log/siyuan |
Create a catalog
1 | sudo mkdir /mydata/siyuan |
Installation and startup
Because the data directory in the image is /home/siyuan/Documents/SiYuan
now the structure is not the same in the two directories and can not be started, so you need to:
Create a temporary container, bind /mydata/siyuan
1
2sudo docker run -d --restart=always --name siyuan \
-v /mydata/siyuan/Documents:/www/wwwroot/siyuan/workspace -p 6806:6806 b3log/siyuanEntering the container
1
sudo docker exec -it siyuan sh
Copy out the data in the container
/home/siyuan/Documents/SiYuan
to /mydata/siyuan1
cp -r /home/siyuan/Documents/SiYuan/ /www/wwwroot/siyuan/workspace/
Check if there are any problems with the replication, and if not, delete the temporary container.
1
2
3sudo docker ps -a # List the running containers and get the id of the temporary container.
sudo docker stop d7ee2596218c # Stop the temporary container based on its id.
sudo docker rm siyuan # Delete the temporary container.start
1
2sudo docker run -it -d --restart=always --name siyuan\
-v /mydata/siyuan/Documents/SiYuan:/home/siyuan/Documents/SiYuan -p 6806:6806 b3log/siyuanfulfillment
SiYuan docker upgrade
1 | sudo docker pull b3log/siyuan ## Pull the new docker |
data backup
1 | ## Method 1 |
All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.
Comment