docker

1.解决docker pull很慢的问题,这里使用阿里云的镜像

[root@localhost ~]# mkdir -p /etc/docker

[root@localhost ~]# tee /etc/docker/daemon.json <<-'EOF'

{ "registry-mirrors": ["https://9cpn8tt6.mirror.aliyuncs.com"]

}

EOF

[root@localhost ~]# systemctl daemon-reload

[root@localhost ~]# systemctl restart docker

2.一次性删除所有的docker容器名称

docker ps -a | grep"Exited"| awk'{print $1 }'|xargs docker stop

docker ps -a | grep"Exited"| awk'{print $1 }'|xargs docker rm

docker images|grep none|awk'{print $3 }'|xargs docker rmi

你可能感兴趣的:(docker)