修改docker 镜像存储位置
sudo systemctl stop docker
sudo systemctl stop docker.socket
sudo mv /var/lib/docker ~/
sudo ln -s ~/docker /var/lib/docker
sudo systemctl start docker.socket
sudo systemctl start docker
docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ee82839b65bb ubuntu:22.04 "/bin/bash" 7 weeks ago Exited (137) 10 minutes ago epic_chatelet
bf9c8c24edc5 ubuntu:20.04 "bash" 8 months ago Exited (0) 10 minutes ago angry_goldstine
docker start bf
docker exec -it bf /bin/bash
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
bf9c8c24edc5 ubuntu:20.04 "bash" 8 months ago Up 14 seconds angry_goldstine
本文链接地址:https://const.net.cn/785.html