ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
[TOC] https://www.unvone.com/70702.html ## docker拉取镜像 ``` docker volume create calibre-web docker volume create calibre-books ``` ``` docker run -itd --name=calibre-web --restart=always -v calibre-books:/books -v calibre-web:/calibre-web/ -e USE_CONFIG_DIR=true -e SET_CONTAINER_TIMEZONE=true -e CONTAINER_TIMEZONE=Asia/Shanghai -e PGID=0 -e PUID=0 -p 8083:8083 technosoft2000/calibre-web ``` ``` docker run -itd --name=calibre-web --restart=always -v /usr/local/calibre-web/books:/books -v /usr/local/calibre-web/app:/calibre-web/app -v /usr/local/calibre-web/kindlegen:/calibre-web/kindlegen -v /usr/local/calibre-web/config:/calibre-web/config -e USE_CONFIG_DIR=true -e SET_CONTAINER_TIMEZONE=true -e CONTAINER_TIMEZONE=Asia/Shanghai -e PGID=0 -e PUID=0 -p 8083:8083 technosoft2000/calibre-web ``` ``` sudo git clone -b master --single-branch https://github.com.cnpmjs.org/janeczku/calibre-web.git /usr/local/calibre-web/app -v ``` 以上是我使用到的参数,如需要配置其他参数可参考官方给出的参数合理增删。 ``` 上面的命令解释 --name=calibre-web #指定容器名称 --restart=always #让容器自动重启 #本地的目录与docker容器进行映射 -v /usr/local/calibre-web/books:/books -v /usr/local/calibre-web/app:/calibre-web/app -v /usr/local/calibre-web/kindlegen:/calibre-web/kindlegen -v /usr/local/calibre-web/config:/calibre-web/config -p 8083:8083 端口映射 ``` ## 通过Dockerfile的方式,更新安装 ``` FROM python:2.7.13 MAINTAINER FandiYuan <georgeyuan@diamondyuan.com> RUN git clone https://github.com.cnpmjs.org/janeczku/calibre-web/ && \ cd calibre-web && \ pip install --target vendor -r requirements.txt EXPOSE 8083 CMD ["python","/calibre-web/cps.py"] ``` ``` docker run -itd --name=calibre-web --restart=always -v /Users/sources/Book/:/books -v /Users/sources/calibre-web/app:/calibre-web/app -v /Users/sources/calibre-web/kindlegen:/calibre-web/kindlegen -v /Users/sources/calibre-web/config:/calibre-web/config -e USE_CONFIG_DIR=true -e SET_CONTAINER_TIMEZONE=true -e CONTAINER_TIMEZONE=Asia/Shanghai -e PGID=0 -e PUID=0 -p 8083:8083 technosoft2000/calibre-web ``` 电子书管理:https://www.xuewangzhan.net/yuma/25756.html ## 再次尝试安装calibre-web ``` docker pull johngong/calibre-web:latest ``` 1. 创建calibre-web容器 ``` docker create \ --name=calibre-web \ -p 8083:8083 \ -p 8080:8080 \ -v /配置文件位置:/config \ -v /书库:/library \ -v /自动添加文件夹:/autoaddbooks \ -e USER=用户名 \ -e PASSWORD=用户密码 \ --restart unless-stopped \ johngong/calibre-web:latest ``` 示例 ``` docker create --name=calibre-web -p 8083:8083 -p 8080:8080 -v /usr/local/calibre-web/config:/config -v /aseit-data/work_zhang/Book:/library -v /usr/local/calibre-web/kindlegen:/autoaddbooks -e USER=calibre -e PASSWORD=calibre -e WEBLANGUAGE=zh_CN --restart unless-stopped johngong/calibre-web:latest ``` 2. 运行 ``` docker start calibre-web ``` 3. 停止 ``` docker stop calibre-web ``` 4. 删除容器 ``` docker rm calibre-web ``` 5. 删除镜像 ``` docker image rm johngong/calibre-web:latest ``` ### 变量: | 参数 | 说明 | | :-- | :-- | | `--name=calibre-web` | 容器名 | | `-p 8083:8083` | calibre-web web访问端口ip:8083,默认用户名: admin 默认密码: admin123 | | `-p 8080:8080` | calibre-server web访问端口ip:8080 | | `-v /配置文件位置:/config` | calibre-web与calibre-server配置位置文件 | | `-v /书库:/library` | calibre-web与calibre-server书库默认位置 | | `-v /自动添加文件夹:/autoaddbooks` | calibre自动添加图书文件夹位置 | | `-e USER=用户名` | calibre-server 用户名 | | `-e PASSWORD=用户密码` | calibre-server 用户密码 | | `-e WEBLANGUAGE=zh_CN` | calibre-server web界面语言,默认中文 | 其它语言: ``` ALLLANGUAGE=("af" "am" "ar" "ast" "az" "be" "bg" "bn" "bn_BD" "bn_IN" "br" "bs" "ca" "crh" "cs" "cy" "da" "de" "el" "en_AU" "en_CA" "en_GB" "eo" "es" "es_MX" "et" "eu" "fa" "fi" "fil" "fo" "fr" "fr_CA" "fur" "ga" "gl" "gu" "he" "hi" "hr" "hu" "hy" "id" "is" "it" "ja" "jv" "ka" "km" "kn" "ko" "ku" "lt" "ltg" "lv" "mi" "mk" "ml" "mn" "mr" "ms" "mt" "my" "nb" "nds" "nl" "nn" "nso" "oc" "or" "pa" "pl" "ps" "pt" "pt_BR" "ro" "ru" "rw" "sc" "si" "sk" "sl" "sq" "sr" "sr@latin" "sv" "ta" "te" "th" "ti" "tr" "tt" "ug" "uk" "ur" "uz@Latn" "ve" "vi" "wa" "xh" "yi" "zh_CN" "zh_HK" "zh_TW" "zu") ``` ### 其它: 1. ebook-convert转换配置:管理-配置-基本设置-外部二进制-选择使用calibre的电子书转换器-转换工具路径:/opt/calibre/ebook-convert-提交 2. calibre-web自带上传功能并不好,可开启calibre-server,并用其上传。 3. ebook-convert转换其它格式到PDF时需要语言字体,不然转换后只有英文。 ``` PDF字体设置: 复制字体到 config\calibre-server\calibrefonts (本地文件夹2\calibre-server\calibrefonts),重启docker。 例如:将simsun.ttc 复制字体到 config\calibre-server\calibrefonts ,中文转换正常。 ```