calibre
注:图片来【本地图书管理:通过calibre-web打造个人在线书城_白毛偷二的博客-CSDN博客】
https://blog.csdn.net/qq_39366927/article/details/123013413
calibre官方下载地址:https://calibre-ebook.com/download
linuxserver/calibre-web:0.6.20-ls221
/volume1/docker/calibre-web/0.6.20-ls221$ mkdir {books,config}
/volume1/docker/calibre-web/0.6.20-ls221$ ls
books config
cp -r /volume1/docker/calibre-web/v1.6.1/books /volume1/docker/calibre-web/0.6.20-ls221/books
cat > docker-compose.yml <<-EOF
version: "2.1"
services:
calibre-web:
image: linuxserver/calibre-web:0.6.20-ls221
container_name: calibre-web
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
- DOCKER_MODS=linuxserver/mods:universal-calibre #optional
- OAUTHLIB_RELAX_TOKEN_SCOPE=1 #optional
volumes:
- ./config:/config
- ./books:/books
ports:
- 8083:8083
restart: unless-stopped
EOF
root@synocxloge:/volume1/docker/calibre-web/0.6.20-ls221# ll
total 4
drwxr-xr-x+ 1 cxloge users 58 Jul 30 15:42 .
drwxr-xr-x+ 1 cxloge users 36 Jul 30 15:12 ..
drwxr-xr-x+ 1 cxloge users 13088 Jul 30 15:36 books
drwxr-xr-x+ 1 1000 1000 138 Jul 30 16:21 config
-rwxrwxrwx 1 cxloge users 441 Jul 30 15:42 docker-compose.yml
root@synocxloge:/volume1/docker/calibre-web/0.6.20-ls221# sudo chown -R 1000:1000 /volume1/docker/calibre-web/0.6.20-ls221/books
root@synocxloge:/volume1/docker/calibre-web/0.6.20-ls221# ll
total 4
drwxr-xr-x+ 1 cxloge users 58 Jul 30 15:42 .
drwxr-xr-x+ 1 cxloge users 36 Jul 30 15:12 ..
drwxr-xr-x+ 1 1000 1000 13088 Jul 30 15:36 books
drwxr-xr-x+ 1 1000 1000 138 Jul 30 16:21 config
-rwxrwxrwx 1 cxloge users 441 Jul 30 15:42 docker-compose.yml
technosoft2000/calibre-web:v1.6.1
获取calibre-web镜像
docker pull xxx.xxx.xx.37:7300/technosoft2000/calibre-web:v1.6.1
# 1.tag重命名 2.rmi异常
docker tag xxx.xxx.xx.37:7300/technosoft2000/calibre-web:v1.6.1 technosoft2000/calibre-web:v1.6.1
docker rmi xxx.xxx.xx.37:7300/technosoft2000/calibre-web:v1.6.1
# 查看已有的images镜像
docker images | grep calibre-web
docker cli
id cxloge
uid=1026(cxloge) gid=100(users) groups=100(users),101(administrators)
id root
uid=0(root) gid=0(root) groups=0(root),2(daemon),19(log)
docker-compose
cat > docker-compose.yml <<-EOF
version: "3.4"
services:
calibre-web:
image: technosoft2000/calibre-web:v1.6.1
container_name: calibre-web-28083
environment:
- PUID=1026
- PGID=100
- TZ=Asia/Shanghai
volumes:
- ./config:/calibre-web/config
- ./books:/books
- ./app:/calibre-web/app
- ./kindlegen:/calibre-web/kindlegen
ports:
- 28083:8083
restart: unless-stopped
EOF
根据已编排好的docker-compose.yml启动容器docker-compose up -d
root@synocxloge:/volume1/docker/calibre-web/v1.6.1-data-1# docker-compose up -d
[+] Running 2/2
⠿ Network v161-data-1_default Created 1.8s
⠿ Container calibre-web-28083 Started 8.1s
root@synocxloge:/volume1/docker/calibre-web/v1.6.1-data-1# docker ps | grep calibre-web
404a31799d6c technosoft2000/calibre-web:v1.6.1 "/bin/bash -c /init/…" 32 seconds ago Up 24 seconds 0.0.0.0:28083->8083/tcp, :::28083->8083/tcp
启动的文件夹挂在目录不正确
删除docker-compose down
,修改docker-compose.yml文件的volumes配置,再重新docker-compose up -d
启动日志
,----, ,
,/ .`| ,
,` .' : .--.--. ,----, ,-. ,
; ; // / '. .' .' \ ,--/ /| ,
.'___,/ ,'| : /`. / ,----,' |,--. :/ | ,
| : | ; | |--` | : . ;: : ' / ,
; |.'; ; | : ;_ ; |.' / | ' / ,
`----' | | \ \ `. `----'/ ; ' | : ,
' : ; `----. \ / ; / | | \ ,
| | ' __ \ \ | ; / /-, ' : |. \ ,
' : | / /`--' / / / /.`| | | ' \ \ ,
; |.' '--'. /./__; : ' : |--' ,
'---' `--'---' | : .' ; |,' ,
; | .' '--' ,
`---' ,
,
PRESENTS ANOTHER AWESOME DOCKER IMAGE,
,
~~~~~ Calibre Web ~~~~~,
,
[INFO] Docker image version: 1.6.0,
[INFO] Alpine Linux version: 3.12.0,
[WARNING] A group with id 100 exists already [in use by users] and will be modified.,
[WARNING] The group users will be renamed to calibre,
[INFO] Create user calibre with id 1026,
[INFO] Current active timezone is CST,
[INFO] Change the ownership of /calibre-web (including subfolders) to calibre:calibre,
[INFO] Current git version is:,
git version 2.26.3,
[INFO] Checkout the latest Calibre-Web version ...,
[INFO] ... git clone -b master --single-branch https://github.com/janeczku/calibre-web.git /calibre-web/app -v,
Cloning into '/calibre-web/app'...,
POST git-upload-pack (331 bytes),
POST git-upload-pack (160 bytes),
error: RPC failed; curl 56 OpenSSL SSL_read: Connection reset by peer, errno 104,
fatal: the remote end hung up unexpectedly,
fatal: early EOF,
fatal: index-pack failed,
[INFO] Autoupdate is active, try to pull the latest sources for Calibre-Web ...,
[INFO] ... current git status is,
fatal: not a git repository (or any parent up to mount point /calibre-web),
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).,
FO] ... pulling sources,
fatal: not a git repository (or any parent up to mount point /calibre-web),
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).,
[INFO] ... git status after update is,
fatal: not a git repository (or any parent up to mount point /calibre-web),
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).,
[INFO] Config directory option is DEACTIVATED,
> due this the Calibre books directory /books will be used to store the configuration,
[INFO] Checking permissions of the config directory: /books,
> Output is: 755 calibre 100 calibre 1026,
> Permissions: 755,
> Assigned group: calibre,
> Assigned group ID: 100,
> Assigned owner: calibre,
> Assigned owner ID: 1026,
> Using permissions for checks: 0755,
> The user calibre:1026 is the owner and has write access at /books,
[INFO] 'app.db' and 'gdrive.db' will be linked into /books,
> create 'app.db' link /calibre-web/app/app.db assigned to source /books/app.db,
> change the ownership of /calibre-web/app/app.db to calibre:calibre,
> create 'gdrive.db' link /calibre-web/app/gdrive.db assigned to source /books/gdrive.db,
> change the ownership of /calibre-web/app/gdrive.db to calibre:calibre,
[INFO] Checking permissions of the books directory: /books,
> Output is: 755 calibre 100 calibre 1026,
> Permissions: 755,
> Assigned group: calibre,
> Assigned group ID: 100,
> Assigned owner: calibre,
> Assigned owner ID: 1026,
> Using permissions for checks: 0755,
> The user calibre:1026 is the owner and has write access at /books,
[INFO] The mapped volume for /books contains a Calibre database file 'metadata.db' which will be used,
[INFO] The kindlegen directory exist already and will be used: /calibre-web/kindlegen,
[INFO] Downloading kindlegen from https://github.com/Technosoft2000/docker-calibre-web/releases/download/kindlegen/kindlegen_linux_2.6_i386_v2_9.tar.gz into directory: /calibre-web/kindlegen/kindlegen_linux_2.6_i386_v2_9.tar.gz,
--2023-07-23 12:09:55-- https://github.com/Technosoft2000/docker-calibre-web/releases/download/kindlegen/kindlegen_linux_2.6_i386_v2_9.tar.gz,
Resolving github.com (github.com)... 20.205.243.166,
Connecting to github.com (github.com)|20.205.243.166|:443... connected.,
FAQ
问题1.解压文件时提示:-sh: unzip: command not found
在centos中有yum,ubantu中有apt-get,而群晖的DSM中没有这些,甚至连rpm都没有。要安装软件用wget下载压缩包,然后自己编译特别麻烦。好在有个轻量级的工具ipkg,用法跟yum和apt-get几乎一样。
https://blog.csdn.net/wjf8882300/article/details/101149490
解决方法
cxloge:$ uname -a
Linux synocxloge 4.4.302+ #64570 SMP Tue Jun 13 21:40:17 CST 2023 x86_64 GNU/Linux synology_apollolake_218+
cxloge:$ cat /etc/issue
cat: /etc/issue: No such file or directory
cxloge:$ sudo apt-get update
Password:
sudo: apt-get: command not found
cxloge:$ sudo yum update
sudo: yum: command not found
cxloge:$ ipkg
-sh: ipkg: command not found
问题2.
Calibre-Web Internal Server Error · Issue #2208 · janeczku/calibre-web · GitHub
https://github.com/janeczku/calibre-web/issues/2208
Database disk image is malformed · Issue #2074 · janeczku/calibre-web · GitHub
https://github.com/janeczku/calibre-web/issues/2074
Your calibre database is defect. Please try to perform a library repair from within calibre itself
参考链接
本地图书管理:通过calibre-web打造个人在线书城
https://blog.csdn.net/qq_39366927/article/details/123013413
GitHub - Technosoft2000/docker-calibre-web: Docker image for Calibre Web https://github.com/janeczku/calibre-web/, based on docker image of Alpine
https://github.com/Technosoft2000/docker-calibre-web
docker系列:docker-compose用法详解 - 知乎
https://zhuanlan.zhihu.com/p/584796326
记一次 群晖利用calibre-web 实现 电子书管理 之 technosoft2000/calibre-web_calibreweb批量导入书籍_m0_52071159的博客-CSDN博客
https://blog.csdn.net/m0_52071159/article/details/128046060
群晖nas搭建个人图书馆一(calibre-web环境搭建) - 知乎
https://zhuanlan.zhihu.com/p/544504281