docker的mount参数中不能有空格
–mount中的参数type、source、target之间不能有空格,不然空格也会被当做是mount的参数,然后就会提示类似下面的错误:
invalid argument "type:bind," for "--mount" flag: invalid field 'type:bind' must be a key=value pair
docker run --rm -tdp 3306:3306 -e MARIADB_ROOT_PASSWORD='1' --mount type=bind,source=$(pwd)/data/,target=/var/lib/mysql/ mariadb