云原生之使用Docker部署Dillinger个人文本编辑器

2023-11-15 19:52:32 浏览数 (1)

一、Dillinger介绍

Dillinger 是一个基于云、可移动的离线存储、基于AngularJS的H5 Markdown编辑器。

二、检查本地docker状态

代码语言:shell复制
[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 Thu 2022-10-27 13:42:27 CST; 33min ago
     Docs: https://docs.docker.com
 Main PID: 58398 (dockerd)
    Tasks: 22
   Memory: 36.1M
   CGroup: /system.slice/docker.service
           ├─58398 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
           ├─58997 /usr/bin/docker-proxy -proto udp -host-ip 0.0.0.0 -host-port 30000 -container-ip 172.17.0.2 -container-port 30000
           └─59004 /usr/bin/docker-proxy -proto udp -host-ip :: -host-port 30000 -container-ip 172.17.0.2 -container-port 30000

Oct 27 13:42:27 node dockerd[58398]: time="2022-10-27T13:42:27.194451058 08:00" level=info msg="ClientConn switching balancer to "pick...ule=grpc
Oct 27 13:42:27 node dockerd[58398]: time="2022-10-27T13:42:27.202813066 08:00" level=info msg="[graphdriver] using prior storage drive...verlay2"
Oct 27 13:42:27 node dockerd[58398]: time="2022-10-27T13:42:27.361105671 08:00" level=info msg="Loading containers: start."
Oct 27 13:42:27 node dockerd[58398]: time="2022-10-27T13:42:27.455971451 08:00" level=info msg="Default bridge (docker0) is assigned wi...address"
Oct 27 13:42:27 node dockerd[58398]: time="2022-10-27T13:42:27.480407438 08:00" level=info msg="Loading containers: done."
Oct 27 13:42:27 node dockerd[58398]: time="2022-10-27T13:42:27.498794448 08:00" level=info msg="Docker daemon" commit=a89b842 graphdriv...20.10.17
Oct 27 13:42:27 node dockerd[58398]: time="2022-10-27T13:42:27.498934823 08:00" level=info msg="Daemon has completed initialization"
Oct 27 13:42:27 node systemd[1]: Started Docker Application Container Engine.
Oct 27 13:42:27 node dockerd[58398]: time="2022-10-27T13:42:27.524417420 08:00" level=info msg="API listen on /var/run/docker.sock"
Oct 27 13:43:36 node dockerd[58398]: time="2022-10-27T13:43:36.895687551 08:00" level=info msg="ignoring event" container=28a26d95c2658...kDelete"
Hint: Some lines were ellipsized, use -l to show in full.

三、下载Dillinger镜像

代码语言:shell复制
[root@node ~]# docker pull ghcr.io/linuxserver/dillinger
Using default tag: latest
latest: Pulling from linuxserver/dillinger
66ce20e6638e: Pull complete 
99bc27d47160: Pull complete 
f83b8e85c025: Pull complete 
cdb23e436e9e: Pull complete 
649b3a5d2745: Pull complete 
Digest: sha256:8a42f93f913a5a09d18d303f2e79821002d4be75771cc7bdcad118a889141145
Status: Downloaded newer image for ghcr.io/linuxserver/dillinger:latest
ghcr.io/linuxserver/dillinger:latest

四、创建Dillinger镜像

1.创建数据目录

代码语言:shell复制
[root@node ~]# mkdir /data/dillinger
[root@node ~]# chmod -R 777 /data/dillinger/
[root@node ~]# 

2.创建Dillinger容器

代码语言:shell复制
docker run -d 
  --name=dillinger 
  -e PUID=1000 
  -e PGID=1000 
  -e TZ=Asia/Shanghai 
  -p 8080:8080 
  -v  /data/dillinger/config/:/config 
  --restart unless-stopped 
ghcr.io/linuxserver/dillinger:latest
image.pngimage.png

3.查看Dillinger容器状态

代码语言:shell复制
[root@node dillinger]# docker ps
CONTAINER ID   IMAGE                                  COMMAND   CREATED          STATUS          PORTS                                           NAMES
9a6844e79

4.查看Dillinger容器日志

代码语言:shell复制
[root@node dillinger]# docker logs dillinger 
[custom-init] No custom services found, skipping...
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service 00-legacy: starting
s6-rc: info: service 00-legacy successfully started
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/01-envfile
cont-init: info: /etc/cont-init.d/01-envfile exited 0
cont-init: info: running /etc/cont-init.d/01-migrations
[migrations] started
[migrations] no migrations found
cont-init: info: /etc/cont-init.d/01-migrations exited 0
cont-init: info: running /etc/cont-init.d/10-adduser

-------------------------------------
          _         ()
         | |  ___   _    __
         | | / __| | |  /  
         | | __  | | | () |
         |_| |___/ |_|  __/


Brought to you by linuxserver.io
-------------------------------------

To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------

User uid:    1000
User gid:    1000
-------------------------------------

cont-init: info: /etc/cont-init.d/10-adduser exited 0
cont-init: info: running /etc/cont-init.d/19-armless
cont-init: info: /etc/cont-init.d/19-armless exited 0
cont-init: info: running /etc/cont-init.d/30-config
cont-init: info: /etc/cont-init.d/30-config exited 0
cont-init: info: running /etc/cont-init.d/99-custom-files
[custom-init] No custom files found, skipping...
cont-init: info: /etc/cont-init.d/99-custom-files exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service init-mods: starting
s6-rc: info: service init-mods successfully started
s6-rc: info: service init-mods-package-install: starting
s6-rc: info: service init-mods-package-install successfully started
s6-rc: info: service init-mods-end: starting
s6-rc: info: service init-mods-end successfully started
s6-rc: info: service init-services: starting
s6-rc: info: service init-services successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun dillinger (no readiness notification)
s6-rc: info: service legacy-services successfully started
s6-rc: info: service 99-ci-service-check: starting
[ls.io-init] done.
s6-rc: info: service 99-ci-service-check successfully started
Dropbox config not found at /app/dillinger/configs/dropbox/dropbox-config.json. Plugin disabled.
Bitbucket config not found at /app/dillinger/configs/bitbucket/bitbucket-config.json. Plugin disabled.
Github config not found at /app/dillinger/configs/github/github-config.json. Plugin disabled.
Medium config not found at /app/dillinger/configs/medium/medium-config.json. Plugin disabled.
Google Drive config not found at /app/dillinger/configs/googledrive/googledrive-config.json. Plugin disabled.
OneDrive config not found at /app/dillinger/configs/onedrive/onedrive-config.json. Plugin disabled.
Sponsored config not found at /app/dillinger/configs/sponsored/sponsored-config.json. Plugin disabled.
GoogleAnalytics config not found at /app/dillinger/configs/googleanalytics/googleanalytics-config.json. Plugin disabled.
Express server listening on port 8080

http://localhost:8080

五、登录Dillinger首页

image.pngimage.png

六、基本使用

1.新建文档

image.pngimage.png

2.导出文档

image.pngimage.png

我正在参与2023腾讯技术创作特训营第三期有奖征文,组队打卡瓜分大奖!

0 人点赞