BuringStraw

BuringStraw

記錄一下思源服務端的安裝過程

第一步,先在本地 wsl 上試一試
首先安裝 docker,然後 docker 服務起不來,給我報

Err :connection error: desc = "transport: Error while dialing dial unix:///var/run/docker/containerd/containerd.sock: timeout". Reconnecting...  module=grpc
failed to start daemon: Error initializing network controller: error obtaining controller instance: unable to add return rule in DOCKER-ISOLATION-STAGE-1 chain:  (iptables failed: iptables --wait -A DOCKER-ISOLATION-STAGE-1 -j RETURN: iptables v1.8.7 (nf_tables):  RULE_APPEND failed (No such file or directory): rule in chain DOCKER-ISOLATION-STAGE-1
 (exit status 4))

經過我的精心搜索,需要這樣:
sudo update-alternatives --set iptables /usr/sbin/iptables-legacy
然後就好了
接著跑思源
要保留資料需要映射資料夾,比如這樣
docker run -v /root/siyuan/:/siyuan/workspace -p 6806:6806 -u 1000:1000 b3log/siyuan --workspace=/siyuan/workspace/
但是如果報
create conf folder [/siyuan/workspace/conf] failed: mkdir /siyuan/workspace/conf: permission denied
說明你容器外面的那個映射的資料夾權限不夠(我也不知道為什麼,不是 root 嗎?),chmod 777 就可以了。
再放上我那 30 一年的伺服器:

docker: Error response from daemon: failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: rootfs_linux.go:75: mounting "proc" to rootfs at "/proc" caused: mount through procfd: permission denied: unknown.
ERRO[0020] error waiting for container: context canceled

我靠,這伺服器跑在 lxc 上的跑不了 docker

載入中......
此文章數據所有權由區塊鏈加密技術和智能合約保障僅歸創作者所有。