docker remove image
docker rmi IMAGE
docker rm CONTAINER
docker commit: create images from container
docker commit -a liang -m "ubuntu installed basic tools" b3185dbd6b39 ubuntu-basic:20.04
docker container clean
# docker container prune
WARNING! This will remove all stopped containers.
Are you sure you want to continue? [y/N] y
Deleted Containers:
b3185dbd6b39e974bc03e51e19244ae0280c005f08845db817e68bddb8bff175
Total reclaimed space: 95.63MB
dockerhub mirror
# cat /etc/docker/daemon.json
{
"registry-mirrors": [
"http://hub-mirror.c.163.com",
"https://registry.docker-cn.com",
"https://4sjn347i.mirror.aliyuncs.com",
"https://docker.mirrors.ustc.edu.cn"
]
}
enable docker debug
enable dockerd debug
# cat /etc/docker/daemon.json
{
"registry-mirrors": [
"https://reg-mirror.qiniu.com",
"https://hub-mirror.c.163.com",
"https://1nj0zren.mirror.aliyuncs.com",
"http://f1361db2.m.daocloud.io",
"https://docker.mirrors.ustc.edu.cn",
"https://registry.docker-cn.com"
],
"debug": true
}
docker log
Ubuntu (old using upstart ) - /var/log/upstart/docker.log
Ubuntu (new using systemd ) - sudo journalctl -fu docker.service
https://stackoverflow.com/questions/30969435/where-is-the-docker-daemon-log
remote all docker images
# (docker rmi -f $(docker images -a -q))