diff --git a/README.md b/README.md index ac797d8..1b24b3f 100644 --- a/README.md +++ b/README.md @@ -1,37 +1,81 @@ -# Dokuwiki Dockerlize +# Dokuwiki Dockerlize v3 -## How to get it +English | [中文简体](README.zh.md) -- One way is `docker pull shuosc/dokuwiki` from Docker Hub in US. -- Another way is `docker pull daocloud.io/zhonger/dokuwiki` from Daocloud in China. -- The third way is `docker build . -t shuosc/dokuwiki` from `Dockerfile`. +## Description -## Features +It is based on `php:7.4-apache` and has pre-installed Dokuwiki. You need do nothing else to start your Dokuwiki journey with our docker image. -- China Ubuntu Sources mirror -- Multilevel -- Supervisor -- Subdirectory (2018.05.02 add) +We also provide the supports for subdirectory and LDAP auth way, which help you to integrate with existed sites and LDAP service. -## Description +## Features -- Based on `ubuntu:latest`, it build from `ubuntu` to `nginx` and `php`. When we add dokuwiki's `nginx conf` and `source code`, the Dokuwiki Dockerlize is done. +- Support subdirectory +- Support LDAP +- Support all CPU archs (including amd64, i386, arm64, s390x and so on) +- Support user real ip +- Support log files persistence -- Based on `supervisor`, it keep the `nginx progress` alive in front. +## How to get it + +- **First way** is `docker pull shuosc/dokuwiki` from Docker Hub in US. +- **Second way** is `docker pull registry.cn-shanghai.aliyuncs.com/shuosc/dokuwiki` from Aliyun Container Registry (ACR) in China. +- **Third way** is `docker build . -t shuosc/dokuwiki` from `Dockerfile`. ## Usage -- change the volumes in the `docker-compose.yml` -- `sudo docker-compose up -d` -- browser `http://127.0.0.1:8004/wiki` -- default admin username & password are both `admin`. +### Docker run + +#### The simplest way + +```bash +docker run -ti -d run --name dokuwiki shuosc/dokuwiki:latest +``` + +#### The completed way + +```bash +docker run -ti -d run --name dokuwiki -p 80:80 -v data:opt/data -v log:/var/log/apache2 -e DIR=wiki shuosc/dokuwiki:latest +``` + +### Docker-compose + +```yaml +# docker-compose.yml + +version: '3' +services: + dokuwiki: + image: shuosc/dokuwiki:latest + ports: + - 80:80 + environment: + - DIR=wiki + volumes: + - ./data:/opt/data + - ./log:/var/log/apache2 +``` + +```bash +docker-compose up -d +``` + +After running the container with the above, you can refer to `http://localhost/wiki` to check it. + +The default admin username & password are both `admin`. **Considering the security, please modify it while you are logged in**. ## Tips -- The subdirectory can be set in `docker-compose.yml`, and `/wiki` is the default. -- The dokuwiki version can be upgrade to the latter stable if you build the images from `Dockerfile`. -- `v1 version` is incomplete because it don't include the dokuwiki source code. In other words, it is just a run enviroment. As `v2 version`, it including all the need, and it cloud be used as long as you pull the latest image from [Docker Hub](https://hub.docker.com/r/shuosc/dokuwiki). +- The subdirectory can be set in `docker-compose.yml`, and `/wiki` is the default. If you don't want to use subdirectory, you can just ignore it. +- Because Dokuwiki stable version generally needs much time (serveral years), we provide both the stable version and development version. Moreover, the `latest` tag of image is the latest development version. +- Now we have supported all CPU archs. Whether it is a common server or Raspberry Pi, it will work. + +## Changelogs + +- 2018/05/03, Build the essential environments for running Dokuwiki (not including Dokuwiki source code). +- 2021/04/24, Upgrade the base image to Ubuntu Focal (20.04) & the PHP version to 7.4. Add vendor directory deny rules. +- 2022/07/02, Upgrade the base image to php:7.4-apache. Fix some bugs for subdirectory. Add LDAP auth way, all cpu archs, user real ip and log files persistentce. -## ChangeLogs +## Acknowledges -- 2021/4/24 Upgrade the base image to Ubuntu Focal (20.04) & the PHP version to 7.4. Add vendor directory deny rules. +Thanks DockerHub and ACR for providing free Docker image resitry. Thanks Github for providing source code hosting and CI/CD tools. Thanks Dokuwiki for developing so elegant Dokuwiki. \ No newline at end of file diff --git a/README.zh.md b/README.zh.md new file mode 100644 index 0000000..bc4a813 --- /dev/null +++ b/README.zh.md @@ -0,0 +1,81 @@ +# Dokuwiki 容器化 V3 + +[English](README.md) | 中文简体 + +## 简介 + +本镜像是基于 `php:7.4-apache` 镜像进行构建,采用预安装的方式呈现。使用该镜像无须做任何安装操作即可开始 Dokuwiki 之旅。 + +本镜像还提供了对二级目录部署方式、LDAP 认证方式的支持,可以快速与团队内部已有的站点、认证方式集成使用。 + +## 特性 + +- 支持二级目录部署 +- 支持 LDAP 认证集成 +- 全架构支持(包含 amd64、i386、arm64 等 8 种架构) +- 用户真实 IP 显示 +- 日志可持久化 + +## 如何获取 + +这里提供了三种方式获取镜像: + +- **第一种**,使用命令 `docker pull shuosc/dokuwiki` 从 Docker Hub(美国) 拉取。 +- **第二种**,使用命令 `docker pull registry.cn-shanghai.aliyuncs.com/shuosc/dokuwiki` 从阿里云容器镜像服务(上海)拉取。 +- **第三种**,使用命令 `docker build . -t shuosc/dokuwiki` 从 `Dockerfile` 手动构建。 + +## 用法 + +### Docker run + +#### 最简配置 + +```bash +docker run -ti -d run --name dokuwiki shuosc/dokuwiki:latest +``` + +#### 完整配置 + +```bash +docker run -ti -d run --name dokuwiki -p 80:80 -v data:opt/data -v log:/var/log/apache2 -e DIR=wiki shuosc/dokuwiki:latest +``` + +### Docker-compose + +```yaml +# docker-compose.yml + +version: '3' +services: + dokuwiki: + image: shuosc/dokuwiki:latest + ports: + - 80:80 + environment: + - DIR=wiki + volumes: + - ./data:/opt/data + - ./log:/var/log/apache2 +``` + +```bash +docker-compose up -d +``` + +访问 `http://localhost/wiki/` 即可,默认管理员用户名和密码均为 `admin`。**出于安全考虑,请务必在登录后修改默认密码**。 + +## 提示 + +- 二级子目录是通过变量 `DIR` 设定的,如果不想使用子目录则无需设置该变量。 +- Dokuwiki 的正式版本一般会隔比较长的时间,所以本镜像会同时提供正式版本和开发版本,并且默认 `latest` 标签是最新开发版本。 +- 本镜像目前已支持全 CPU 架构,无论是一般的服务器还是树莓派,均可使用。 + +## 开发日志 + +- 2018/05/03,构建运行 Dokuwiki 所需的完整环境镜像(不含 Dokuwiki 代码)。 +- 2021/04/24,升级基础镜像为 Ubuntu Focal (20.04)、PHP 版本为 7.4,增加 `vendor` 目录禁止访问限制。 +- 2022/07/02,升级基础镜像为 php:7.4-apache,完善二级子目录支持,增加 LDAP 认证支持、全架构镜像支持、用户真实 IP 及日志持久化。 + +## 致谢 + +感谢 Dockerhub 和 ACR 为我们提供了镜像托管,感谢 Github 为我们提供了代码托管和 CI/CD 环境,感谢 Dokuwiki 团队开发了优雅的 Dokuwiki。 \ No newline at end of file