1、安装好docker,输入docker version;
显示如下:
[root@VM_0_10_centos ~]# docker version
Client:
Version: 1.13.1
API version: 1.26
Package version: docker-1.13.1-96.gitb2f74b2.el7.centos.x86_64
Go version: go1.10.3
Git commit: b2f74b2/1.13.1
Built: Wed May 1 14:55:20 2019
OS/Arch: linux/amd64
Server:
Version: 1.13.1
API version: 1.26 (minimum version 1.12)
Package version: docker-1.13.1-96.gitb2f74b2.el7.centos.x86_64
Go version: go1.10.3
Git commit: b2f74b2/1.13.1
Built: Wed May 1 14:55:20 2019
OS/Arch: linux/amd64
Experimental: false
2、docker 拉取 mysql5.7
sudo docker pull mysql:5.7
3、查看拉取的镜像
sudo docker images
4、创建文件夹保存数据
mkdir -p /data/mysql/conf (保存mysql配置文件)
mkdir -p /data/mysql/data (保存mysql数据)
mkdir -p /data/mysql/log (保存mysql日志)