#下载镜像创建容器########
docker run -d -P -v /iswww/:/var/www/html -v /data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=123456 mattrayner/lamp
#登录容器
docker exec -it 容器名 bash
#mysql数据库设置########
#登录
mysql -u root
#修改密码
update mysql.user set authentication_string=password('123456') where user='root';
#立即生效
flush privileges
#新增数据库
create database zbx;
#wordpress下载解压到宿主机根目录下iswww目录
docker ps 查看镜像随机端口映射到80的端口
#访问
#完成
原文链接:https://blog.csdn.net/zhangbaoxiang/article/details/107524229?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522168623078216800226541510%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fblog.%2522%257D&request_id=168623078216800226541510&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~blog~first_rank_ecpm_v1~times_rank-25-107524229-null-null.268%5Ev1%5Ekoosearch&utm_term=docker%E3%80%81wordpress%E3%80%81wordpress%E5%BB%BA%E7%AB%99%E3%80%81wordpress%E4%B8%BB%E9%A2%98%E3%80%81%E5%AE%B9%E5%99%A8%E9%95%9C%E5%83%8F%E3%80%81