mac虚拟机常用位置
/var/lib/docker/overlay2/6cf74ecc1227dc93a85d02f15fc85c588111ea0807a65b9c2b85d9ecc704b621/diff/www/wwwroot/admin.walle-web.io
根据overlay2目录名 查找containerId名称
docker ps -q | xargs docker inspect --format '{{.State.Pid}}, {{.Id}}, {{.Name}}, {{.GraphDriver.Data.WorkDir}}' | grep "b68f87da21051f6e3037a72cd703e2d2b0a740e607dc184a14db177e2b4c54da"
Centos-test b68f87da21051f6e3037a72cd703e2d2b0a740e607dc184a14db177e2b4c54da
Error path
/var/lib/docker/overlay2/d4e4dcf2b5388fcd5ad0d940fe9d69bc367d9458f6be60c7d82b2ac240cb853e/diff/www/wwwroot/walle-web/fe
Centos path
/var/lib/docker/overlay2/b68f87da21051f6e3037a72cd703e2d2b0a740e607dc184a14db177e2b4c54da
docker启动mysql 切记是5.7
docker run -itd -p 3306:3306 --name mysql -v /Users/nnnnzs/docker_v/mysql:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=123456 -d mysql:5.7
redis
# 切记是5.0.3
docker run -itd --name my-redis -p 6379:6379 redis:5.0.3
mac下docker 虚拟机目录
stty -echo -icanon && nc -U ~/Library/Containers/com.docker.docker/Data/debug-shell.sock && stty sane # ls -al /var/lib/docker/overlay2/
青龙面板
docker run -dit -v $PWD/ql/data:/ql/data -p 5700:5700 --name qinglong --hostname qinglong --restart unless-stopped whyour/qinglong:latest
mysql
docker run --name mysql8 -e MYSQL_ROOT_PASSWORD=mysql8 -p 3300:3306 -v $(pwd)/data:/var/lib/mysql -d mysql:8
打包镜像
docker save -o /root/xxx.tar <name>
导入镜像
docker load -i /root/xxx.tar