Help us understand the problem. What is going on with this article?

Dockerのイメージファイルの格納場所

More than 3 years have passed since last update.

Dockerからhello-worldとdocker/whalesayをpullして、ダウンロードしてきたのですが
一体どこにダウンロードされているんだろうという謎が出てきました。

  • 今あるイメージ
$ docker images 
REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
hello-world         latest              0a6ba66e537a        2 weeks ago         960 B
docker/whalesay     latest              ded5e192a685        5 months ago        247 MB
  • 調べてみると、/var/lib/docker 辺りにあるらしい
    http://blog.thoward37.me/articles/where-are-docker-images-stored/

    $ sudo cat /var/lib/docker/repositories-aufs | python -mjson.tool
    {
    "Repositories": {
        "docker/whalesay": {
            "latest": "ded5e192a685b2c5f048ea98ca24f4c8c4dccc012185448a0247b49b24645007"
        },
        "hello-world": {
            "latest": "0a6ba66e537a53a5ea94f7c6a99c534c6adb12e3ed09326d4bf3b38f7c3ba4e7"
        }
    }
    }
    
  • サイズも見てみる。それっぽい!

    $ sudo du -s /var/lib/docker
    279924  /var/lib/docker
    $ sudo du -sBM /var/lib/docker
    274M    /var/lib/docker
    
Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away