本文主要是介绍8-Docker网络命令之prune,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
1.prune介绍
Docker网络命令prune是用来删除所有无用的网络
2.prune用法
docker network prune [参数]
[root@centos79 ~]# docker network prune --helpUsage: docker network prune [OPTIONS]Remove all unused networksOptions:--filter filter Provide filter values (e.g. "until=<timestamp>")-f, --force Do not prompt for confirmation
[root@centos79 ~]#
3.prune样例
3.1.删除所有无用的网络
命令:
docker network prune
[root@centos79 ~]# docker network ls
NETWORK ID NAME DRIVER SCOPE
6fe1398a5652 bridge bridge local
806f281c40a3 elk bridge local
6dfaabaf6333 host host local
e33f2e7fe685 mynet1 bridge local
8a8734a4776a none null local
[root@centos79 ~]# docker network prune
WARNING! This will remove all custom networks not used by at least one container.
Are you sure you want to continue? [y/N] y
Deleted Networks:
elk
mynet1[root@centos79 ~]# docker network ls
NETWORK ID NAME DRIVER SCOPE
6fe1398a5652 bridge bridge local
6dfaabaf6333 host host local
8a8734a4776a none null local
[root@centos79 ~]#
这篇关于8-Docker网络命令之prune的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!