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 runに失敗したコンテナにログインして、デバッグする方法

Posted at

docker runが失敗したコンテナの中身を確認したい場合、docker commitで失敗したコンテナをイメージ化して、ログインします。

docker commit <コンテナID or コンテナ名> debug && docker run --rm -it debug sh
  • docker runに失敗したコンテナのコンテナIDは、docker ps -aで調べられます。
  • "debug" がコンテナイメージ名となります。不要になったら、docker rmi debugで消しましょう。
0
0
1

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?