前提:https://github.com/ https://hub.docker.com/ 注册一个github账户和一个dockerhub账户
注:所写的每一步都是必须的
1.登录github创建一个项目
Repositories : new一个github项目
Repository name : github项目名称
Initialize this repository with a README : 勾选
2.在创建好的项目中添加一个文件(docker file)
Create new file : 创建文件
Name your file... : github文件名称
From gcr.io/google-samples/xtrabackup:1.0 : 文件内容(From 后面跟要下载的镜像名称)
3.登录dockerhub创建项目并构造镜像
Create Repository : new一个dockerhub项目
Name : dockerhub项目名称
Connected : 构建设置
Select repository : 选择github项目名称
Dockerfile location : 把Dockerfile替换为github文件名称
Create & Build : 构建并构造