一、下载docker镜像
sudo docker pull johngong/calibre-web
二、创建calibre-web镜像的映射目录,存放配置文件&书籍
mkdir /home/pi/Backup/projects/calibre-web
mkdir /home/pi/Backup/projects/calibre-web/config
mkdir /home/pi/Backup/projects/calibre-web/library
三、拉起calibre-web镜像
docker run -d --privileged --name=calibre-web --restart=always -p 8083:8083 -v /home/pi/Backup/projects/calibre-web/config:/config -v /home/pi/Backup/projects/calibre-web/library:/library johngong/calibre-web
--name=calibre-web:容器命名为calibre-web
--restart=always:跟随docker重启
-p 8083:8083:映射宿主端口 8083(前)到容器8083(后,calibre-web默认端口)
-v /home/pi/Backup/projects/calibre-web/config:/config:映射配置路径
-v /home/pi/Backup/projects/calibre-web/library:/library:映射资源库路径
四、浏览器访问
使用ip:8083(docker设置的宿主机端口)进行访问
user/password:admin/admin123
登录后即可进行相关设置(更改密码,更改主题,添加用户等)
五、附注
树莓派docker run有可能出现一下报错
docker: Error response from daemon: failed to create endpoint xxx on network bridge: failed to create endpoint xxxx on network bridge: failed to add the host (veth999999) <=> sandbox (vetha8888888) pair interfaces: operation not supported
解决办法:
Ubuntu系统:
sudo apt update
sudo apt install linux-modules-extra-raspi
sudo reboot
Raspbian系统:
sudo rpi-update
sudo reboot