云原生之使用Docker部署etherpad文档编辑器

一、Etherpad介绍

1.Etherpad简介

Etherpad是一个高度可定制的开源在线编辑器,提供真正实时的协作编辑。

2.Etherpad特点

Etherpad 允许您实时协作编辑文档,就像在浏览器中运行的实时多人编辑器一样。与您的朋友、同学或同事一起撰写文章、新闻稿、待办事项等,所有这些都在同一时间处理同一个文档。

二、检查本地docker服务状态


[root@docker ~]# 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 Mon 2022-10-24 14:10:39 CST; 6h ago
     Docs: https://docs.docker.com
 Main PID: 9426 (dockerd)
    Tasks: 41
   Memory: 1.7G
   CGroup: /system.slice/docker.service
           ├─  9426 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
           ├─144827 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 86 -container-ip 172.17.0.2 -container-port 80...
           ├─144833 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 86 -container-ip 172.17.0.2 -container-port 80
           ├─183396 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 9000 -container-ip 172.17.0.3 -container-port ...
           └─183401 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 9000 -container-ip 172.17.0.3 -container-port 9000

Oct 24 18:11:55 docker dockerd[9426]: time="2022-10-24T18:11:55.431551808+08:00" level=error msg="Error getting nodes: T...again."
Oct 24 18:11:55 docker dockerd[9426]: time="2022-10-24T18:11:55.431579907+08:00" level=error msg="Handler for GET /v1.41...again."
Oct 24 18:11:55 docker dockerd[9426]: time="2022-10-24T18:11:55.467388441+08:00" level=error msg="Handler for GET /v1.41...again."
Oct 24 18:11:55 docker dockerd[9426]: time="2022-10-24T18:11:55.484831180+08:00" level=error msg="Error getting services...again."
Oct 24 18:11:55 docker dockerd[9426]: time="2022-10-24T18:11:55.484858251+08:00" level=error msg="Handler for GET /v1.41...again."
Oct 24 18:16:13 docker dockerd[9426]: time="2022-10-24T18:16:13.574059987+08:00" level=error msg="stream copy error: rea...d fifo"
Oct 24 18:16:13 docker dockerd[9426]: time="2022-10-24T18:16:13.578243765+08:00" level=error msg="Error running exec 5b0773d8a9...
Oct 24 19:40:05 docker dockerd[9426]: time="2022-10-24T19:40:05.784393499+08:00" level=warning msg="reference for unknow...latest"
Oct 24 19:40:06 docker dockerd[9426]: time="2022-10-24T19:40:06.073803186+08:00" level=warning msg="Error persisting manifest" ...
Oct 24 19:40:06 docker dockerd[9426]: time="2022-10-24T19:40:06.073851342+08:00" level=warning msg="Image docker.io/abh1...ma-v1/"
Hint: Some lines were ellipsized, use -l to show in full.

三、下载Etherpad镜像

[root@docker ~]# docker pull etherpad/etherpad
Using default tag: latest
latest: Pulling from etherpad/etherpad
a10c77af2613: Pull complete 
e66c53b2d7ce: Pull complete 
f075c52d5e9e: Pull complete 
180083ba7828: Pull complete 
47e7e5f16683: Pull complete 
b2a2e6d96a60: Pull complete 
6e7fdcf8a3ed: Pull complete 
97989a99633c: Pull complete 
4f4fb700ef54: Pull complete 
48d2f6ec6297: Downloading 
669fe533f308: Download complete 
3ddcc11be40f: Download complete 
1db652f33098: Download complete 
latest: Pulling from etherpad/etherpad
4be315f6562f: Pull complete 
96866e173b1b: Pull complete 
ccc6ddd9a8b3: Pull complete 
3212537995a3: Pull complete 
36ed153d6379: Pull complete 
bc53350ced68: Pull complete 
437200c9e697: Pull complete 
8c21086c8d61: Pull complete 
4f4fb700ef54: Pull complete 
2c6ad18aa9dd: Pull complete 
b2c75e5c9954: Pull complete 
79a690b74de1: Pull complete 
09f3bbc78945: Pull complete 
Digest: sha256:7d97804b5a9751f9fabdbdbdb003fa5644690a6b845e91a1450b15246bf06a83
Status: Downloaded newer image for etherpad/etherpad:latest
docker.io/etherpad/etherpad:latest



四、部署Etherpad容器

1.创建数据目录

[root@docker ~]# mkdir -p /data/etherpad
[root@docker ~]# cd /data/etherpad/
[root@docker etherpad]# ls

2.目录授权

需要指定挂载目录权限,个人或测试环境可授予完全权限。

chmod -R 777 /data/etherpad/

3.创建Etherpad容器

[root@docker etherpad]# docker run -d --name etherpad --restart always -p 9001:9001 -v /data/etherpad/data:/opt/etherpad-lite/var etherpad/etherpad:latest
d1ad595bda8babddd108d3932f02c167e3bb0ef57c121ab55a1186e4c147305e

4.查看Etherpad容器状态


[root@docker etherpad]# docker ps -a
CONTAINER ID   IMAGE                      COMMAND                  CREATED         STATUS                            PORTS                                       NAMES
d1ad595bda8b   etherpad/etherpad:latest   "docker-entrypoint.s…"   3 minutes ago   Up 4 seconds (health: starting)   0.0.0.0:9001->9001/tcp, :::9001->9001/tcp   etherpad

五、访问Etherpad首页

image.png

六、Etherpad基本操作

1.新建记事本

image.png

2.发送协作聊天消息

image.png

3.导入文本内容

image.png

4.查看导入文本内容

image.png

猜你喜欢

转载自blog.csdn.net/jks212454/article/details/129542593
今日推荐