创建镜像 docker build -t letote/mysqldump:0.1 .
备份所有非配置项的数据库
docker run --rm -v /Users/sunshiwei/Downloads/tongbu:/mysqldump
-e AWS_ACCESS_KEY_ID=*******
-e AWS_SECRET_ACCESS_KEY=******
-e AWS_BUCKET=******
-e PREFIX=******
-e ALL_DATABASES=TRUE
-e DB_PASS=******
-e DB_USER=******
-e DB_HOST=******
letote/mysqldump:0.1
备份指定数据库
docker run --rm -v /Users/sunshiwei/Downloads/tongbu:/mysqldump
-e AWS_ACCESS_KEY_ID=*******
-e AWS_SECRET_ACCESS_KEY=********
-e AWS_BUCKET=******
-e PREFIX=******
-e DB_NAME=******
-e DB_PASS=******
-e DB_USER=******
-e DB_HOST=******
letote/mysqldump:0.1