8-Docker网络命令之rm

1.rm介绍

Docker网络命令rm是用来默认或自定义创建的网络

2.rm用法

docker network rm [参数] NETWORK

[root@centos79 ~]# docker network rm --help

Usage:  docker network rm NETWORK [NETWORK...]

Remove one or more networks

Aliases:
  docker network rm, docker network remove

Options:
  -f, --force   Do not error if the network does not exist
[root@centos79 ~]# 

3.rm样例

3.1.删除网络

命令:

docker network rm ztj

[root@centos79 ~]# docker network ls 
NETWORK ID     NAME        DRIVER    SCOPE
3c318451380b   bridge      bridge    local
806f281c40a3   elk         bridge    local
6dfaabaf6333   host        host      local
e33f2e7fe685   mynet1      bridge    local
cc08febefe8a   mynetwork   bridge    local
8a8734a4776a   none        null      local
5a60f0af41f4   ztj         bridge    local
[root@centos79 ~]# docker network rm ztj 
ztj
[root@centos79 ~]# docker network ls 
NETWORK ID     NAME  

你可能感兴趣的:(docker,docker,容器,运维)