20
12

More than 1 year has passed since last update.

Docker のコンテナが停止できなくなった場合

Posted at

問題

docker-compose down などをしても以下のように正常に終了できない。

[+] Running 0/1
 ⠿ Container webdev-pgsql-1  Error while Stopping       879.0s
[+] Running 0/1
 ⠿ Container app-1  Error while Stopping                                                                     24.0s
Error response from daemon: cannot stop container: d76d6e2a5f8aed35a4462b11c591c210fe18dc11e38063305cbf636de85fa91e: tried to kill container, but did not receive an exit event

解決策

mac の場合

Docker for Desktop をUIで再起動すれば良いはず。

それでも直らない事象にあったので、その場合は以下コマンドで直った。

killall Docker && open /Applications/Docker.app

その後各コンテナが削除できるはず。

liunx の場合

sudo service docker restart

20
12
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
20
12