拉取镜像(image)
docker pull mysql:5.6.51
root@ecs-fxbzf:~# docker pull mysql:5.6.51
5.6.51: Pulling from library/mysql
89166b5eeae4: Pull complete
73631a7ee13b: Pull complete
f287d5f3290c: Pull complete
0a24ae08d840: Pull complete
4b749bd83c0e: Pull complete
69787256215e: Pull complete
0d273eb6cdd8: Pull complete
9a897b78ad8f: Pull complete
be6019f70120: Pull complete
6bfeaf47594e: Pull complete
0ead5a0e294b: Pull complete
Digest: sha256:740eb9fb4fdedfa9edb60c656db104f7cc497f0aab55a8df412d51e73a0615ae
Status: Downloaded newer image for mysql:5.6.51
docker.io/library/mysql:5.6.51
运行一个mysql容器实例(password=123456 现在不能改,下面有方法)
docker run --name mysql -d -p 3306:3306 -v /home/mysql