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 1 year has passed since last update.

Dockerの停止済コンテナが削除できない場合の対応方法

Posted at

停止済のコンテナを削除した際にエラーが発生して削除できない事象が発生したので、対応方法をメモしておく。

エラー内容

user@server:~/docker/app1 $ docker-compose down
Removing app1 ... error

ERROR: for app1  removal of container eb23b2419de65c7a10204c41e2663abb8bdd304f1b5ebb6959e8b92575f5c399 is already in progress
Removing network app1_default

対応方法

# Dockerを停止
sudo service docker stop

# rootユーザーに切り替え
sudo -su root

# コンテナのファイルがあるディレクトリへ移動
cd /var/lib/docker/containers/

# 対象のファイルを削除
rm -fr eb23b2419de65c7a10204c41e2663abb8bdd304f1b5ebb6959e8b92575f5c399

# 元のユーザーに戻る
exit

# Dockerを起動
sudo service docker start
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?