docker_practice/appendix/repo/wordpress.md

26 lines
819 B
Markdown
Raw Normal View History

2018-12-14 11:08:14 +00:00
## [WordPress](https://hub.docker.com/_/wordpress/)
2016-12-10 09:00:25 +00:00
### 基本信息
2017-11-24 02:19:15 +00:00
[WordPress](https://en.wikipedia.org/wiki/WordPress) 是开源的 Blog 和内容管理系统框架,它基于 PHP 和 MySQL。
2018-12-15 15:04:32 +00:00
该仓库位于 `https://hub.docker.com/_/wordpress/` ,提供了 WordPress 4.x ~ 5.x 版本的镜像。
2016-12-10 09:00:25 +00:00
### 使用方法
2017-11-24 02:19:15 +00:00
2016-12-10 09:00:25 +00:00
启动容器需要 MySQL 的支持,默认端口为 `80`
2017-11-22 03:13:23 +00:00
```bash
2016-12-10 09:00:25 +00:00
$ docker run --name some-wordpress --link some-mysql:mysql -d wordpress
```
2017-11-24 02:19:15 +00:00
2017-12-31 06:26:03 +00:00
启动 WordPress 容器时可以指定的一些环境变量包括:
2016-12-10 09:00:25 +00:00
2017-12-31 06:26:03 +00:00
* `WORDPRESS_DB_USER` 缺省为 `root`
* `WORDPRESS_DB_PASSWORD` 缺省为连接 mysql 容器的环境变量 `MYSQL_ROOT_PASSWORD` 的值
* `WORDPRESS_DB_NAME` 缺省为 `wordpress`
2016-12-10 09:00:25 +00:00
### Dockerfile
2017-10-31 16:36:57 +00:00
请到 https://github.com/docker-library/docs/tree/master/wordpress 查看。