728x90

목차

     

    yum 저장소에서 도커 제거

    [root@docker03 ~]# yum remove docker docker-common docker-selinux docker-engine
    Loaded plugins: fastestmirror
    No Match for argument: docker
    No Match for argument: docker-common
    No Match for argument: docker-engine
    Resolving Dependencies
    --> Running transaction check
    ---> Package container-selinux.noarch 2:2.119.2-1.911c772.el7_8 will be erased
    --> Processing Dependency: container-selinux >= 2:2.74 for package: 3:docker-ce-24.0.5-1.el7.x86_64
    --> Processing Dependency: container-selinux >= 2:2.74 for package: containerd.io-1.6.22-3.1.el7.x86_64
    --> Running transaction check
    ---> Package containerd.io.x86_64 0:1.6.22-3.1.el7 will be erased
    ---> Package docker-ce.x86_64 3:24.0.5-1.el7 will be erased
    --> Processing Dependency: docker-ce for package: docker-ce-rootless-extras-24.0.5-1.el7.x86_64
    --> Running transaction check
    ---> Package docker-ce-rootless-extras.x86_64 0:24.0.5-1.el7 will be erased
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    =============================================================================================
     Package                     Arch     Version                      Repository           Size
    =============================================================================================
    Removing:
     container-selinux           noarch   2:2.119.2-1.911c772.el7_8    @docker-repo         41 k
    Removing for dependencies:
     containerd.io               x86_64   1.6.22-3.1.el7               @docker-ce-stable   114 M
     docker-ce                   x86_64   3:24.0.5-1.el7               @docker-ce-stable    98 M
     docker-ce-rootless-extras   x86_64   24.0.5-1.el7                 @docker-ce-stable    19 M
    
    Transaction Summary
    =============================================================================================
    Remove  1 Package (+3 Dependent packages)
    
    Installed size: 231 M
    Is this ok [y/N]: y
    Downloading packages:
    Running transaction check
    Running transaction test
    Transaction test succeeded
    Running transaction
      Erasing    : docker-ce-rootless-extras-24.0.5-1.el7.x86_64                             1/4
      Erasing    : 3:docker-ce-24.0.5-1.el7.x86_64                                           2/4
      Erasing    : containerd.io-1.6.22-3.1.el7.x86_64                                       3/4
    warning: /etc/containerd/config.toml saved as /etc/containerd/config.toml.rpmsave
      Erasing    : 2:container-selinux-2.119.2-1.911c772.el7_8.noarch                        4/4
      Verifying  : containerd.io-1.6.22-3.1.el7.x86_64                                       1/4
      Verifying  : 3:docker-ce-24.0.5-1.el7.x86_64                                           2/4
      Verifying  : docker-ce-rootless-extras-24.0.5-1.el7.x86_64                             3/4
      Verifying  : 2:container-selinux-2.119.2-1.911c772.el7_8.noarch                        4/4
    
    Removed:
      container-selinux.noarch 2:2.119.2-1.911c772.el7_8
    
    Dependency Removed:
      containerd.io.x86_64 0:1.6.22-3.1.el7                 docker-ce.x86_64 3:24.0.5-1.el7
      docker-ce-rootless-extras.x86_64 0:24.0.5-1.el7
    
    Complete!
    [root@docker03 ~]# yum remove -y docker-ce* docker-engine docker docker.io *docker* containerd.io*
    Loaded plugins: fastestmirror
    No Match for argument: docker-engine
    No Match for argument: docker
    No Match for argument: docker.io
    No Match for argument: containerd.io*
    Resolving Dependencies
    --> Running transaction check
    ---> Package docker-buildx-plugin.x86_64 0:0.11.2-1.el7 will be erased
    ---> Package docker-ce-cli.x86_64 1:24.0.5-1.el7 will be erased
    ---> Package docker-compose-plugin.x86_64 0:2.20.2-1.el7 will be erased
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    =============================================================================================
     Package                     Arch         Version              Repository               Size
    =============================================================================================
    Removing:
     docker-buildx-plugin        x86_64       0.11.2-1.el7         @docker-ce-stable        59 M
     docker-ce-cli               x86_64       1:24.0.5-1.el7       @docker-ce-stable        35 M
     docker-compose-plugin       x86_64       2.20.2-1.el7         @docker-ce-stable        58 M
    
    Transaction Summary
    =============================================================================================
    Remove  3 Packages
    
    Installed size: 151 M
    Downloading packages:
    Running transaction check
    Running transaction test
    Transaction test succeeded
    Running transaction
      Erasing    : 1:docker-ce-cli-24.0.5-1.el7.x86_64                                       1/3
      Erasing    : docker-buildx-plugin-0.11.2-1.el7.x86_64                                  2/3
      Erasing    : docker-compose-plugin-2.20.2-1.el7.x86_64                                 3/3
      Verifying  : 1:docker-ce-cli-24.0.5-1.el7.x86_64                                       1/3
      Verifying  : docker-compose-plugin-2.20.2-1.el7.x86_64                                 2/3
      Verifying  : docker-buildx-plugin-0.11.2-1.el7.x86_64                                  3/3
    
    Removed:
      docker-buildx-plugin.x86_64 0:0.11.2-1.el7        docker-ce-cli.x86_64 1:24.0.5-1.el7
      docker-compose-plugin.x86_64 0:2.20.2-1.el7
    
    Complete!
    [root@docker03 ~]# yum autoremove docker-ce docker-engine docker.io *docker* containerd.io*
    Loaded plugins: fastestmirror
    No Match for argument: docker-ce
    No Match for argument: docker-engine
    No Match for argument: docker.io
    No Match for argument: *docker*
    No Match for argument: containerd.io*
    No Packages marked for removal

     

    docker 디렉토리 삭제

    rm -rf /var/lib/docker* /etc/docker*
    rm -rf /var/run/docker.sock /var/run/docker

     

    docker 삭제 확인

    [root@docker03 run]# docker
    -bash: /usr/bin/docker: No such file or directory

     

    ip link 및 route -n에서 docker 제거

    [root@docker03 run]# ip link
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
        link/ether ba:4a:af:78:ba:f8 brd ff:ff:ff:ff:ff:ff
    3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
        link/ether ea:50:9d:b8:76:6b brd ff:ff:ff:ff:ff:ff
    4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
        link/ether c2:80:a4:b5:01:c8 brd ff:ff:ff:ff:ff:ff
    5: eth3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
        link/ether 02:89:f4:84:10:9d brd ff:ff:ff:ff:ff:ff
    6: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default
        link/ether 02:42:c8:13:b9:b4 brd ff:ff:ff:ff:ff:ff
    7: tunl0@NONE: <NOARP,UP,LOWER_UP> mtu 1480 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
        link/ipip 0.0.0.0 brd 0.0.0.0
    15: datapath: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1376 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
        link/ether ca:fe:d9:dc:8b:c3 brd ff:ff:ff:ff:ff:ff
    17: weave: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1376 qdisc noqueue state UP mode DEFAULT group default qlen 1000
        link/ether da:0c:8f:ba:dd:9d brd ff:ff:ff:ff:ff:ff
    18: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
        link/ether 6e:c9:e9:a7:dc:16 brd ff:ff:ff:ff:ff:ff
    20: vethwe-datapath@vethwe-bridge: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1376 qdisc noqueue master datapath state UP mode DEFAULT group default
        link/ether 8e:2b:c9:66:72:99 brd ff:ff:ff:ff:ff:ff
    21: vethwe-bridge@vethwe-datapath: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1376 qdisc noqueue master weave state UP mode DEFAULT group default
        link/ether 8a:b7:64:1b:3e:70 brd ff:ff:ff:ff:ff:ff
    22: vxlan-6784: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 65535 qdisc noqueue master datapath state UNKNOWN mode DEFAULT group default qlen 1000
        link/ether 0e:d3:33:b3:20:96 brd ff:ff:ff:ff:ff:ff
        
        
    [root@docker03 run]# route -n
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    0.0.0.0         10.10.50.254    0.0.0.0         UG    100    0        0 eth0
    10.10.50.0      0.0.0.0         255.255.255.0   U     100    0        0 eth0
    10.32.0.0       0.0.0.0         255.240.0.0     U     0      0        0 weave
    192.168.138.0   0.0.0.0         255.255.255.0   U     0      0        0 docker0
    192.168.243.128 0.0.0.0         255.255.255.192 U     0      0        0 *
    [root@docker03 run]# ip link delete docker0
    [root@docker03 run]# route -n
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    0.0.0.0         10.10.50.254    0.0.0.0         UG    100    0        0 eth0
    10.10.50.0      0.0.0.0         255.255.255.0   U     100    0        0 eth0
    10.32.0.0       0.0.0.0         255.240.0.0     U     0      0        0 weave
    192.168.243.128 0.0.0.0         255.255.255.192 U     0      0        0 *
    [root@docker03 run]# ip link
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
        link/ether ba:4a:af:78:ba:f8 brd ff:ff:ff:ff:ff:ff
    3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
        link/ether ea:50:9d:b8:76:6b brd ff:ff:ff:ff:ff:ff
    4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
        link/ether c2:80:a4:b5:01:c8 brd ff:ff:ff:ff:ff:ff
    5: eth3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
        link/ether 02:89:f4:84:10:9d brd ff:ff:ff:ff:ff:ff
    7: tunl0@NONE: <NOARP,UP,LOWER_UP> mtu 1480 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
        link/ipip 0.0.0.0 brd 0.0.0.0
    15: datapath: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1376 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
        link/ether ca:fe:d9:dc:8b:c3 brd ff:ff:ff:ff:ff:ff
    17: weave: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1376 qdisc noqueue state UP mode DEFAULT group default qlen 1000
        link/ether da:0c:8f:ba:dd:9d brd ff:ff:ff:ff:ff:ff
    18: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
        link/ether 6e:c9:e9:a7:dc:16 brd ff:ff:ff:ff:ff:ff
    20: vethwe-datapath@vethwe-bridge: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1376 qdisc noqueue master datapath state UP mode DEFAULT group default
        link/ether 8e:2b:c9:66:72:99 brd ff:ff:ff:ff:ff:ff
    21: vethwe-bridge@vethwe-datapath: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1376 qdisc noqueue master weave state UP mode DEFAULT group default
        link/ether 8a:b7:64:1b:3e:70 brd ff:ff:ff:ff:ff:ff
    22: vxlan-6784: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 65535 qdisc noqueue master datapath state UNKNOWN mode DEFAULT group default qlen 1000
        link/ether 0e:d3:33:b3:20:96 brd ff:ff:ff:ff:ff:ff
    # weave도 안쓸거기 때문에 제거해준다.
    [root@docker03 run]# ip link delete weave
    728x90
    TOP