LoginSignup
14
10

More than 3 years have passed since last update.

ERROR: error while removing network: network {{NAME}} id {{ID}} has active endpoints

Posted at

レアケースかとは思いますが、私のようなせっかちな人なら経験あるのではないでしょうか。。。
docker-compose stop またはdocker-compose down などしてからプロジェクトファイルを物削しましょ。
でないと、

dockerのコンテナが上手いこと止めれない

コンテナ止めようかなーなんて軽い気持ちでコマンドを叩きます。

$ docker-compose down
WARNING: Found orphan containers {{CONTAINER_NAME}} for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
Removing network {{NAME}}
ERROR: error while removing network: network {{NAME}} id {{ID}} has active endpoints

すぅごい怒られる。

結論

--remove-orphans オプションを付与してお掃除したらOKでした。

$ docker-compose down --remove-orphans
Removing orphan container "{{CONTAINER_NAME}}"
Removing network {{NAME}}

他にもあるみたいです

私の場合、以下の記事では上手くいきませんでしたが、参考にさせて頂いたサイト様です。
こんな方法もあるみたいなのでまずはこちらを参考にしてみてください。

docker network rmコマンドの使い方(実例付)CE対応

14
10
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
14
10