云原生之使用Docker部署Dokuwiki个人笔记工具

简介: 云原生之使用Docker部署Dokuwiki个人笔记工具

一、Dokuwiki介绍

Dokuwiki 是一种易于使用且用途广泛的开源Wiki软件,且它不需要数据库。它以其清晰易读的语法受到用户的喜爱。易于维护、备份和集成使其成为管理员的最爱。

二、查看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 Thu 2022-10-27 13:58:22 CST; 2h 38min ago
     Docs: https://docs.docker.com
 Main PID: 8223 (dockerd)
    Tasks: 39
   Memory: 132.3M
   CGroup: /system.slice/docker.service
           ├─8223 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
           ├─8822 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 3000 -container-ip 172.25.0.2 -container-port 3000
           ├─8824 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 89 -container-ip 172.17.0.2 -container-port 80
           ├─8835 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 3000 -container-ip 172.25.0.2 -container-port 3000
           └─8841 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 89 -container-ip 172.17.0.2 -container-port 80

Oct 27 13:57:54 docker dockerd[8223]: time="2022-10-27T13:57:54.455109491+08:00" level=info msg="Loading containers: start."
Oct 27 13:57:55 docker dockerd[8223]: time="2022-10-27T13:57:55.181714757+08:00" level=info msg="Default bridge (docker0) is assigned w...address"
Oct 27 13:58:21 docker dockerd[8223]: time="2022-10-27T13:58:21.615780846+08:00" level=info msg="Loading containers: done."
Oct 27 13:58:21 docker dockerd[8223]: time="2022-10-27T13:58:21.947341520+08:00" level=info msg="Docker daemon" commit=e42327a graphdri...20.10.18
Oct 27 13:58:21 docker dockerd[8223]: time="2022-10-27T13:58:21.947426129+08:00" level=info msg="Daemon has completed initialization"
Oct 27 13:58:22 docker dockerd[8223]: time="2022-10-27T13:58:22.506093152+08:00" level=info msg="API listen on /var/run/docker.sock"
Oct 27 13:58:22 docker systemd[1]: Started Docker Application Container Engine.
Oct 27 14:01:32 docker dockerd[8223]: time="2022-10-27T14:01:32.785020262+08:00" level=warning msg="Error getting v2 registry: Get \"ht...eaders)"
Oct 27 14:01:32 docker dockerd[8223]: time="2022-10-27T14:01:32.785047262+08:00" level=info msg="Attempting next endpoint for pull afte...eaders)"
Oct 27 14:01:32 docker dockerd[8223]: time="2022-10-27T14:01:32.833445154+08:00" level=error msg="Handler for POST /v1.41/images/create...eaders)"
Hint: Some lines were ellipsized, use -l to show in full.

三、下载Dokuwiki镜像

[root@docker dokuwiki]# docker pull ghcr.io/linuxserver/dokuwiki
Using default tag: latest
latest: Pulling from linuxserver/dokuwiki
66ce20e6638e: Already exists 
99bc27d47160: Already exists 
f83b8e85c025: Already exists 
bf5c69bc329a: Pull complete 
67182e6106b7: Pull complete 
efef3dca657b: Pull complete 
5718dfa1cd84: Pull complete 
Digest: sha256:42c695dd84b236ca30214904cffcac620a5b2ba4a1ef958245e423c16c9bff7b
Status: Downloaded newer image for ghcr.io/linuxserver/dokuwiki:latest
ghcr.io/linuxserver/dokuwiki:latest

四、安装Dokuwiki

1.创建数据目录

 mkdir -p /data/dokuwiki  && chmod -R 777  /data/dokuwiki 

2.创建Dokuwiki容器

docker run -d \
  --name=dokuwiki \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=Asia/Shanghai \
  -p 8741:80 \
  -p 443:443 `#optional` \
  -v /data/dokuwiki/config:/config \
  --restart unless-stopped \
  ghcr.io/linuxserver/dokuwiki:latest

image.png

3.查看Dokuwiki容器状态

[root@docker dokuwiki]# docker ps
CONTAINER ID   IMAGE                                       COMMAND                  CREATED          STATUS          PORTS                                                                          NAMES
036ae9218c38   ghcr.io/linuxserver/dokuwiki:latest         "/init"                  45 seconds ago   Up 41 seconds   0.0.0.0:443->443/tcp, :::443->443/tcp, 0.0.0.0:8741->80/tcp, :::8741->80/tcp   dokuwiki

五、Dokuwiki初始化工作

1.初始化Dokuwiki

首次启动容器后,先访问 http://ip:port/install.php 进行配置,完成之后重启容器。

2.查看容器日志

[root@docker dokuwiki]# docker restart dokuwiki 
dokuwiki
[root@docker dokuwiki]# docker logs bbe
[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] 01-nginx-site-confs-default: executing...
[migrations] 01-nginx-site-confs-default: succeeded
[migrations] 02-default-location: executing...
grep: /config/nginx/site-confs/default.conf: No such file or directory
[migrations] 02-default-location: succeeded
[migrations] done
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/11-folders
cont-init: info: /etc/cont-init.d/11-folders exited 0
cont-init: info: running /etc/cont-init.d/12-samples
cont-init: info: /etc/cont-init.d/12-samples exited 0
cont-init: info: running /etc/cont-init.d/13-nginx
Setting resolver to  223.5.5.5 192.168.3.254
Setting worker_processes to 2
cont-init: info: /etc/cont-init.d/13-nginx exited 0
cont-init: info: running /etc/cont-init.d/14-php
cont-init: info: /etc/cont-init.d/14-php exited 0
cont-init: info: running /etc/cont-init.d/15-keygen
generating self-signed keys in /config/keys, you can replace these with your own keys if required
Generating a RSA private key
................+++++
.......................+++++
writing new private key to '/config/keys/cert.key'
-----
cont-init: info: /etc/cont-init.d/15-keygen exited 0
cont-init: info: running /etc/cont-init.d/20-permissions
cont-init: info: /etc/cont-init.d/20-permissions exited 0
cont-init: info: running /etc/cont-init.d/50-config
Go to http://IP-ADDRESS:PORT/install.php to configure your install then restart your container when finished to remove install.php
[cont-init.d] Setting permissions this may take some time
cont-init: info: /etc/cont-init.d/50-config exited 0
cont-init: info: running /etc/cont-init.d/85-version-checks
cont-init: info: /etc/cont-init.d/85-version-checks 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 cron (no readiness notification)
services-up: info: copying legacy longrun nginx (no readiness notification)
services-up: info: copying legacy longrun php-fpm (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
s6-rc: info: service 99-ci-service-check: stopping
s6-rc: info: service 99-ci-service-check successfully stopped
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service init-services: stopping
s6-rc: info: service 00-legacy: stopping
s6-rc: info: service init-services successfully stopped
s6-rc: info: service init-mods-end: stopping
s6-rc: info: service 00-legacy successfully stopped
s6-rc: info: service init-mods-end successfully stopped
s6-rc: info: service init-mods-package-install: stopping
s6-rc: info: service init-mods-package-install successfully stopped
s6-rc: info: service init-mods: stopping
s6-rc: info: service init-mods successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
[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] 01-nginx-site-confs-default: skipped
[migrations] 02-default-location: skipped
[migrations] done
cont-init: info: /etc/cont-init.d/01-migrations exited 0
cont-init: info: running /etc/cont-init.d/10-adduser
usermod: no changes

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


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/11-folders
cont-init: info: /etc/cont-init.d/11-folders exited 0
cont-init: info: running /etc/cont-init.d/12-samples
cont-init: info: /etc/cont-init.d/12-samples exited 0
cont-init: info: running /etc/cont-init.d/13-nginx
cont-init: info: /etc/cont-init.d/13-nginx exited 0
cont-init: info: running /etc/cont-init.d/14-php
cont-init: info: /etc/cont-init.d/14-php exited 0
cont-init: info: running /etc/cont-init.d/15-keygen
using keys found in /config/keys
cont-init: info: /etc/cont-init.d/15-keygen exited 0
cont-init: info: running /etc/cont-init.d/20-permissions
cont-init: info: /etc/cont-init.d/20-permissions exited 0
cont-init: info: running /etc/cont-init.d/50-config
Go to http://IP-ADDRESS:PORT/install.php to configure your install then restart your container when finished to remove install.php
[cont-init.d] Setting permissions this may take some time
cont-init: info: /etc/cont-init.d/50-config exited 0
cont-init: info: running /etc/cont-init.d/85-version-checks
cont-init: info: /etc/cont-init.d/85-version-checks 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 cron (no readiness notification)
services-up: info: copying legacy longrun nginx (no readiness notification)
services-up: info: copying legacy longrun php-fpm (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



六、访问Dokuwiki

image.png

image.png

image.png

相关文章
|
4天前
|
Ubuntu Linux 开发工具
docker 是什么?docker初认识之如何部署docker-优雅草后续将会把产品发布部署至docker容器中-因此会出相关系列文章-优雅草央千澈
Docker 是一个开源的容器化平台,允许开发者将应用程序及其依赖项打包成标准化单元(容器),确保在任何支持 Docker 的操作系统上一致运行。容器共享主机内核,提供轻量级、高效的执行环境。本文介绍如何在 Ubuntu 上安装 Docker,并通过简单步骤验证安装成功。后续文章将探讨使用 Docker 部署开源项目。优雅草央千澈 源、安装 Docker 包、验证安装 - 适用场景:开发、测试、生产环境 通过以上步骤,您可以在 Ubuntu 系统上成功安装并运行 Docker,为后续的应用部署打下基础。
docker 是什么?docker初认识之如何部署docker-优雅草后续将会把产品发布部署至docker容器中-因此会出相关系列文章-优雅草央千澈
|
10天前
|
存储 Kubernetes 开发者
容器化时代的领航者:Docker 和 Kubernetes 云原生时代的黄金搭档
Docker 是一种开源的应用容器引擎,允许开发者将应用程序及其依赖打包成可移植的镜像,并在任何支持 Docker 的平台上运行。其核心概念包括镜像、容器和仓库。镜像是只读的文件系统,容器是镜像的运行实例,仓库用于存储和分发镜像。Kubernetes(k8s)则是容器集群管理系统,提供自动化部署、扩展和维护等功能,支持服务发现、负载均衡、自动伸缩等特性。两者结合使用,可以实现高效的容器化应用管理和运维。Docker 主要用于单主机上的容器管理,而 Kubernetes 则专注于跨多主机的容器编排与调度。尽管 k8s 逐渐减少了对 Docker 作为容器运行时的支持,但 Doc
66 5
容器化时代的领航者:Docker 和 Kubernetes 云原生时代的黄金搭档
|
29天前
|
存储 监控 C++
11 个必备 Docker 工具
11 个必备 Docker 工具
168 11
11 个必备 Docker 工具
|
1月前
|
Java 应用服务中间件 Docker
将基于 Spring 的 WAR 应用程序部署到 Docker:详尽指南
将基于 Spring 的 WAR 应用程序部署到 Docker:详尽指南
33 2
|
1月前
|
存储 安全 数据中心
Docker 容器凭借轻量级和高效的特性,成为应用部署的重要工具
Docker 容器凭借轻量级和高效的特性,成为应用部署的重要工具。本文探讨了 Docker 如何通过 Namespace 和 Cgroups 实现 CPU、内存、网络和存储资源的隔离,提高系统安全性和资源利用率,以及面临的挑战和应对策略。
47 1
|
2月前
|
Java Linux Docker
什么是 Docker?如何将 Spring Boot 应用程序部署到 Docker?
什么是 Docker?如何将 Spring Boot 应用程序部署到 Docker?
49 3
|
29天前
|
运维 Cloud Native 持续交付
深入理解云原生架构及其在现代企业中的应用
随着数字化转型的浪潮席卷全球,企业正面临着前所未有的挑战与机遇。云计算技术的迅猛发展,特别是云原生架构的兴起,正在重塑企业的IT基础设施和软件开发模式。本文将深入探讨云原生的核心概念、关键技术以及如何在企业中实施云原生策略,以实现更高效的资源利用和更快的市场响应速度。通过分析云原生架构的优势和面临的挑战,我们将揭示它如何助力企业在激烈的市场竞争中保持领先地位。
|
27天前
|
Kubernetes Cloud Native 微服务
探索云原生技术:容器化与微服务架构的融合之旅
本文将带领读者深入了解云原生技术的核心概念,特别是容器化和微服务架构如何相辅相成,共同构建现代软件系统。我们将通过实际代码示例,探讨如何在云平台上部署和管理微服务,以及如何使用容器编排工具来自动化这一过程。文章旨在为开发者和技术决策者提供实用的指导,帮助他们在云原生时代中更好地设计、部署和维护应用。
|
2月前
|
Cloud Native Devops 云计算
云计算的未来:云原生架构与微服务的革命####
【10月更文挑战第21天】 随着企业数字化转型的加速,云原生技术正迅速成为IT行业的新宠。本文深入探讨了云原生架构的核心理念、关键技术如容器化和微服务的优势,以及如何通过这些技术实现高效、灵活且可扩展的现代应用开发。我们将揭示云原生如何重塑软件开发流程,提升业务敏捷性,并探索其对企业IT架构的深远影响。 ####
45 3
|
2月前
|
Cloud Native 持续交付 云计算
云原生架构的演进与挑战
随着云计算技术的不断发展,云原生架构已成为企业数字化转型的重要支撑。本文深入探讨了云原生架构的概念、发展历程、核心技术以及面临的挑战,旨在为读者提供一个全面了解云原生架构的视角。通过分析Kubernetes、Docker等关键技术的应用,以及微服务、持续集成/持续部署(CI/CD)等实践案例,本文揭示了云原生架构在提高应用开发效率、降低运维成本、增强系统可扩展性等方面的显著优势。同时,也指出了云原生架构在安全性、复杂性管理等方面所面临的挑战,并提出了相应的解决策略。

热门文章

最新文章