基于Docker 搭建WordPress的方法
1.首先下载mysql镜像和wordpress镜像
[root@kangvcar ~]# docker pull hub.c.163.com/library/mysql:latest [root@kangvcar ~]# docker pull hub.c.163.com/library/wordpress:latest
2.查看本地镜像列表
[root@kangvcar ~]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE hub.c.163.com/library/wordpress latest ca96afcfa242 4 weeks ago 405.7 MB hub.c.163.com/library/mysql latest 9e64176cd8a2 8 weeks ago 407.1 MB
3.用mysql镜像启动mysql容器
[root@kangvcar ~]# docker run --name mysql_wordpress -e MYSQL_ROOT_PASSWORD=000000 -d hub.c.163.com/library/mysql:latest 35f82ce4a617575356046439fd0dbb2cdc369c4332760d375774f0041bc93e64
4.用wordpress镜像启动wordpress容器,并link到上一步创建的mysql_wordpress容器
[root@kangvcar ~]# docker run --name wordpress --link mysql_wordpress:mysql_wordpress -p 80:80 -d hub.c.163.com/library/wordpress:latest 2b1b81df9749f637ff3ec8534489657cc8d39b54202e260fdef9195028e4ea08
5.访问
相关推荐
Wordpress0 2020-09-27
bluehost 2020-09-15
maccarty 2020-08-03
86520993 2020-07-28
WordPress 2020-07-04
李维山 2020-06-21
GimmeS 2020-06-14
WordPress 2020-06-10
shayuchaor 2020-06-10
liwf 2020-06-02
疯狂老司机 2020-05-26
zcl 2020-05-12
timewind 2020-05-11
86520993 2020-05-04
Lophole 2020-04-29
fraternityjava 2020-04-23
84911835 2020-04-16
maccarty 2020-04-09
WordPress 2020-04-07