0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Dockerコンテナネットワークにコンテナの残骸が残ってしまった場合の対処記録

Last updated at Posted at 2021-08-08

Docker コンテナネットワークにコンテナの残骸が残ってしまった場合の対処記録

ここではコンテナネットワークを「nginx_default」として、
コンテナは docker ps -a でも存在しない状態とする.

エラーログ

ERROR: error while removing network: network nginx_default id 1579f5ba164110a988d35967a5aa3133a65d4d465662afa54de51ad6a0494001 has active endpoints

参考にした記事

手順

ネットワーク「nginx_default」に残っているコンテナを探し出す

$ docker inspect nginx_default
略
        "Containers": {
            "61025d49a6b27cb53b11b8fb449ba2d3566aea5304e300248ce46a71c4539f57": {
                "Name": 🛑"myfld_elasticsearch_fluentd2",
                "EndpointID": "7cf55e3f906d313d09bffa25d3e990036483e248cc68a91c77f1adeb34182d74",
                "MacAddress": "02:42:ac:1b:00:06",
                "IPv4Address": "172.27.0.6/16",
                "IPv6Address": ""
            }

次のコマンドによって、上記コンテナ🛑をネットワーク「nginx_default」から外してやる.

$ docker network disconnect -f nginx_default myfld_elasticsearch_fluentd2

なお、上記 myfld_elasticsearch_fluentd2 のところを 6102 では失敗した

 

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?