1. 前提是Docker已经安装好了
没有安装的可以看这篇文章-->CentOS 7安装Docker
2.拉取mysql镜像
docker pull mysql
docker images
可以看到我们拉取的镜像
[root@bogon ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
mynginx latest 1964089d63e611 days ago 108MB
docker.io/mysql 5.7 98455b9624a9 2 weeks ago 372MB
docker.io/jenkins/jenkins lts 806f56c84444 8 weeks ago 703MB
docker.io/tomcat latest 168588387c68 2 months ago 463MB
docker.io/redis latest 0f55cf3661e9 2 months ago 95MB
docker.io/nginx latest f09fe80eb0e7 2 months ago 109MB
docker.io/mysql latest