云原生之使用Docker部署BookBrowser电子书浏览器

举报
江湖有缘 发表于 2022/11/13 19:46:33 2022/11/13
【摘要】 云原生之使用Docker部署BookBrowser电子书浏览器

一、BookBrowser简介

BookBrowser一个易于使用的工具,用于生成基于 Web 的 ePub 和 PDF 电子书浏览器。

二、检查docker状态

[root@node ~]# systemctl status docker
● docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
   Active: active (running) since Sun 2022-11-06 06:02:26 CST; 1 weeks 0 days ago
     Docs: https://docs.docker.com
 Main PID: 9869 (dockerd)
    Tasks: 192
   Memory: 2.6G
   CGroup: /system.slice/docker.service
           ├─  9869 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
           ├─ 34968 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 8097 -container-ip 172.17.0.6 -container-port 80
           ├─ 34973 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 8097 -container-ip 172.17.0.6 -container-port 80
           ├─ 34986 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 473 -container-ip 172.17.0.6 -container-port 443
           ├─ 34992 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 473 -container-ip 172.17.0.6 -container-port 443
           ├─ 45650 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 3522 -container-ip 192.168.48.2 -container-port 3306
           ├─ 45656 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 3522 -container-ip 192.168.48.2 -container-port 3306
           ├─ 46338 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 9300 -container-ip 172.17.0.2 -container-port 9000
           ├─ 46344 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 9300 -container-ip 172.17.0.2 -container-port 9000
           ├─ 46357 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 443 -container-ip 172.17.0.2 -container-port 443
           ├─ 46363 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 443 -container-ip 172.17.0.2 -container-port 443
           ├─ 46376 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 8011 -container-ip 172.17.0.2 -container-port 80
           ├─ 46382 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 8011 -container-ip 172.17.0.2 -container-port 80
           ├─ 71708 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 3520 -container-ip 172.17.0.3 -container-port 3000
           ├─ 71714 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 3520 -container-ip 172.17.0.3 -container-port 3000
           ├─ 76830 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 8080 -container-ip 172.17.0.4 -container-port 8080
           ├─ 76835 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 8080 -container-ip 172.17.0.4 -container-port 8080
           ├─ 76849 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 6881 -container-ip 172.17.0.4 -container-port 6881
           ├─ 76854 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 6881 -container-ip 172.17.0.4 -container-port 6881
           ├─ 76868 /usr/bin/docker-proxy -proto udp -host-ip 0.0.0.0 -host-port 6881 -container-ip 172.17.0.4 -container-port 6881
           ├─ 76874 /usr/bin/docker-proxy -proto udp -host-ip :: -host-port 6881 -container-ip 172.17.0.4 -container-port 6881
           ├─101732 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 9200 -container-ip 192.168.32.3 -container-port 9100
           ├─101746 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 9200 -container-ip 192.168.32.3 -container-port 9100
           ├─101760 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 3010 -container-ip 192.168.32.4 -container-port 3000
           ├─101766 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 3010 -container-ip 192.168.32.4 -container-port 3000
           ├─102555 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 9122 -container-ip 192.168.32.2 -container-port 9090
           ├─102561 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 9122 -container-ip 192.168.32.2 -container-port 9090
           ├─116950 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 9800 -container-ip 172.17.0.5 -container-port 9000
           └─116955 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 9800 -container-ip 172.17.0.5 -container-port 9000

Nov 09 17:48:07 node dockerd[9869]: time="2022-11-09T17:48:07.633429323+08:00" level=info msg="Pull session cancelled"
Nov 09 17:48:08 node dockerd[9869]: time="2022-11-09T17:48:08.335184004+08:00" level=error msg="Not continuing with pull after error: c...canceled"
Nov 11 00:44:36 node dockerd[9869]: time="2022-11-11T00:44:36.758834914+08:00" level=info msg="ignoring event" container=3d1d952e40c6d7...skDelete"
Nov 11 00:48:57 node dockerd[9869]: time="2022-11-11T00:48:57.472382417+08:00" level=info msg="ignoring event" container=6ae040e9643b73...skDelete"
Nov 13 14:34:13 node dockerd[9869]: time="2022-11-13T14:34:13.306710904+08:00" level=info msg="ignoring event" container=607074fd6da226...skDelete"
Nov 13 14:35:17 node dockerd[9869]: time="2022-11-13T14:35:17.974604494+08:00" level=info msg="ignoring event" container=81100fca24b68a...skDelete"
Nov 13 14:36:26 node dockerd[9869]: time="2022-11-13T14:36:26.538414842+08:00" level=info msg="ignoring event" container=adf8be72d97d2b...skDelete"
Nov 13 16:12:38 node dockerd[9869]: time="2022-11-13T16:12:38.176476416+08:00" level=warning msg="Failed to allocate and map port 443-4...llocated"
Nov 13 16:12:38 node dockerd[9869]: time="2022-11-13T16:12:38.214612484+08:00" level=error msg="97c8082d0624e9dce5197a671c64b1954754c95...ontainer"
Nov 13 16:12:38 node dockerd[9869]: time="2022-11-13T16:12:38.214737789+08:00" level=error msg="Handler for POST /v1.41/containers/97c8082d0624e...
Hint: Some lines were ellipsized, use -l to show in full.



三、下载BookBrowser镜像

[root@node ~]# docker pull dezhao/bookbrowser_cn
Using default tag: latest
latest: Pulling from dezhao/bookbrowser_cn
59bf1c3509f3: Already exists 
c9e8b8b3cee0: Pull complete 
1343d96c84a2: Pull complete 
Digest: sha256:042459893ae66e1f8e7a2ed0e5735b81fc8097f02a9c6500f20d3baf5917c7d6
Status: Downloaded newer image for dezhao/bookbrowser_cn:latest
docker.io/dezhao/bookbrowser_cn:latest


四、部署BookBrowser

1.创建数据目录

[root@node ~]# mkdir -p /data/bookbrowser
[root@node ~]# chmod -R 777 /data/bookbrowser/
[root@node ~]# cd /data/bookbrowser/



2.部署BookBrowser

[root@node book]# docker run -d --name bookbrowser --restart always -p 8190:8090 -v /data/bookbrowser/book:/books   dezhao/bookbrowser_cn:latest
ea8251f40ad4cd813e7c348d26a6f88c3355f6315ec1c00062b6842a5fabfb0e




3.查看BookBrowser容器状态

[root@node book]# docker ps
CONTAINER ID   IMAGE                                                   COMMAND                  CREATED         STATUS         PORTS                                                                                                                             NAMES
ea8251f40ad4   dezhao/bookbrowser_cn:latest                            "/BookBrowser --book…"   5 seconds ago   Up 3 seconds   0.0.0.0:8190->8090/tcp, :::8190->8090/tcp                                                                                         bookbrowser



五、访问BookBrowser

image.png

【版权声明】本文为华为云社区用户原创内容,转载时必须标注文章的来源(华为云社区)、文章链接、文章作者等基本信息, 否则作者和本社区有权追究责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@huaweicloud.com
  • 点赞
  • 收藏
  • 关注作者

评论(0

0/1000
抱歉,系统识别当前为高风险访问,暂不支持该操作

全部回复

上滑加载中

设置昵称

在此一键设置昵称,即可参与社区互动!

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。