4
5

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 5 years have passed since last update.

docker buildに失敗したimageへのアクセス方法

Posted at

docker build時に失敗した場合に中身がどの状態なのかを確認したい場合

$ docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
amasok/test         1.1                 f0f37a3e695b        30 minutes ago      1.131 GB
amasok/test         1.0                 507b9f361bdd        About an hour ago   612.3 MB
<none>              <none>              ab29bda5a4a3        2 hours ago         551.1 MB

docker buildに失敗すると、上記のようにREPOSITORYとTAGがのものが作られる。
IMAGE IDab29bda5a4a3にログインしたい場合は以下のコマンドで可能

# docker run --rm -it <IMAGE ID> sh
docker run --rm -it ab29bda5a4a3 sh
4
5
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
4
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?