Where is Docker Store located on Ubuntu?

Asked

Viewed 1,345 times

1

I’m studying Docker, so this question I’m asking is for a debutante.

  1. Images are the files that contain the configuration of the machine you want to create.
  2. Container is an instance of this image running and running.
  3. Docker Store is the record of the Docker images. It would be the "Location" where the various images that will instantiate the Docker containers are stored.

So, when you want to run a container Docker goes inside the Docker Store and looks for the image of the requested container.

I installed the Docker on my Ubuntu machine. I can run the Docker but I don’t know where that image is coming from. I pulled the initial hello-world image. I downloaded it but I don’t know physically where this image is stored.

So where is it physically located (path) from the Docker Store by default? Or rather, which Docker command to check where the Docker Store is from that installation?

1 answer

1


First login (example below my context, Ubuntu also):

$ sudo docker login
Login with your Docker ID to push and pull images from Docker Hub. If you don't 
have a Docker ID, head over to https://hub.docker.com to create one. 
Username (user): user
Username (user): Digite a senha
Login Succeeded

After login you can use several commands, I just don’t know if it will help you much, the way Docker build the artifacts is very complex, for example with the command docker info you will find that the root of Docker is in Docker Root Dir: /var/lib/docker (in my context), from here you will find everything, images, containers, etc. Then you can check the system’s competence with command tree /var/lib/docker, to be possible to paste here I limited the Tree to the depth of 3, see the result (partial).

$ sudo tree -L 3  /var/lib/docker/ 
/var/lib/docker/
├── aufs
│   ├── diff
│   │   ├── 109fcc3eb0ea93d2576fc5ed6fa5ae33d4dbfb344061a6802feecd022a3bb84b
│   │   ├── 178191e9492b90a31a3d13c07c39d3ab41a557379347730d857c3bc3fc735e36
│   │   ├── 178191e9492b90a31a3d13c07c39d3ab41a557379347730d857c3bc3fc735e36-init
│   │   ├── 189e7299d5f883444b91c9d020d231c1d1add078fb1f34b2d04d27ff9a7e8327
│   │   ├── 1d717521113b760e648f76cf347484958d3f5457a47336f87abaad858e7ba564
│   │   ├── 306ef406016a1078f4e45d2094d5099989194d65d6455ce39617b01ec04b96d2
│   │   ├── 36292f12e0b0a98d279f3fc55c68c23e98d065a1f67ba1c5819c1a9b2a29f8ec
│   │   ├── 382d434dd6da0a10364f310033f2b8c627fa9fa23e414fc510345f191de1a932
│   │   ├── 583fae26ed74e736c0cc84fb4dc6181b4994e6da9bf6b05068b00f7fd8d9ff52
│   │   ├── 5e50cb22c4f8edeba6a35bf60f8b2cf17181ff94fbb7864082001b5612186edf
│   │   ├── 7021ba5bc40a5bb5485eb3595babda1b32f5f314462276eb36f26f68abd479d2
│   │   ├── 7148b8e7abb56ecfd219ede7c2fda5d97d295ae2b917be07777150552f76fd48
│   │   ├── 79c5b73accaebb7d34ee7b09e8308a4113e750020454553dc1d40405818fb044
│   │   ├── 7a9079a68382a3a059d2e3c304f6c7bf78cdfa711e1ee797a1069c0916702a32
│   │   ├── 8932ee3cfac5c28298dbc898fc6772d6e9c761853385abb57fd06b991039d01a
│   │   ├── 90deda4aa2cb1a8267e2827a430db2537c47188b6b455e6ff3b977f1583ee398
│   │   ├── 9536443410f3f4bb4bbaaf9a884c04f3d6a72fb4245e24150fa1b11a3a1af691
│   │   ├── ade74ca2ab4aeb242524125bf94b9bb733c749f3e1674f4aee39c96987e1f10e
│   │   ├── c984433fe781e3e178f8c7c43a643b335b01cf68536c9382afd6a16fe0acbc3a
│   │   ├── d13d50ed234e25bfbe91e04d26cf983a9aa77cd3b3f35b254a906b29695833b7
│   │   └── ec9443cd7a3f822a0fbfb0424f5e219f75749af8d917cbfb012daa2aeca599b8
│   ├── layers
│   │   ├── 109fcc3eb0ea93d2576fc5ed6fa5ae33d4dbfb344061a6802feecd022a3bb84b
│   │   ├── 178191e9492b90a31a3d13c07c39d3ab41a557379347730d857c3bc3fc735e36
│   │   ├── 178191e9492b90a31a3d13c07c39d3ab41a557379347730d857c3bc3fc735e36-init
│   │   ├── 189e7299d5f883444b91c9d020d231c1d1add078fb1f34b2d04d27ff9a7e8327
│   │   ├── 1d717521113b760e648f76cf347484958d3f5457a47336f87abaad858e7ba564
│   │   ├── 306ef406016a1078f4e45d2094d5099989194d65d6455ce39617b01ec04b96d2
│   │   ├── 36292f12e0b0a98d279f3fc55c68c23e98d065a1f67ba1c5819c1a9b2a29f8ec
│   │   ├── 382d434dd6da0a10364f310033f2b8c627fa9fa23e414fc510345f191de1a932
│   │   ├── 583fae26ed74e736c0cc84fb4dc6181b4994e6da9bf6b05068b00f7fd8d9ff52
│   │   ├── 5e50cb22c4f8edeba6a35bf60f8b2cf17181ff94fbb7864082001b5612186edf
│   │   ├── 7021ba5bc40a5bb5485eb3595babda1b32f5f314462276eb36f26f68abd479d2
│   │   ├── 7148b8e7abb56ecfd219ede7c2fda5d97d295ae2b917be07777150552f76fd48
│   │   ├── 79c5b73accaebb7d34ee7b09e8308a4113e750020454553dc1d40405818fb044
│   │   ├── 7a9079a68382a3a059d2e3c304f6c7bf78cdfa711e1ee797a1069c0916702a32
│   │   ├── 8932ee3cfac5c28298dbc898fc6772d6e9c761853385abb57fd06b991039d01a
│   │   ├── 90deda4aa2cb1a8267e2827a430db2537c47188b6b455e6ff3b977f1583ee398
│   │   ├── 9536443410f3f4bb4bbaaf9a884c04f3d6a72fb4245e24150fa1b11a3a1af691
│   │   ├── ade74ca2ab4aeb242524125bf94b9bb733c749f3e1674f4aee39c96987e1f10e
│   │   ├── c984433fe781e3e178f8c7c43a643b335b01cf68536c9382afd6a16fe0acbc3a
│   │   ├── d13d50ed234e25bfbe91e04d26cf983a9aa77cd3b3f35b254a906b29695833b7
│   │   └── ec9443cd7a3f822a0fbfb0424f5e219f75749af8d917cbfb012daa2aeca599b8
│   └── mnt
│       ├── 109fcc3eb0ea93d2576fc5ed6fa5ae33d4dbfb344061a6802feecd022a3bb84b
│       ├── 178191e9492b90a31a3d13c07c39d3ab41a557379347730d857c3bc3fc735e36
│       ├── 178191e9492b90a31a3d13c07c39d3ab41a557379347730d857c3bc3fc735e36-init
│       ├── 189e7299d5f883444b91c9d020d231c1d1add078fb1f34b2d04d27ff9a7e8327
│       ├── 1d717521113b760e648f76cf347484958d3f5457a47336f87abaad858e7ba564
│       ├── 306ef406016a1078f4e45d2094d5099989194d65d6455ce39617b01ec04b96d2
│       ├── 36292f12e0b0a98d279f3fc55c68c23e98d065a1f67ba1c5819c1a9b2a29f8ec
│       ├── 382d434dd6da0a10364f310033f2b8c627fa9fa23e414fc510345f191de1a932
│       ├── 583fae26ed74e736c0cc84fb4dc6181b4994e6da9bf6b05068b00f7fd8d9ff52
│       ├── 5e50cb22c4f8edeba6a35bf60f8b2cf17181ff94fbb7864082001b5612186edf
│       ├── 7021ba5bc40a5bb5485eb3595babda1b32f5f314462276eb36f26f68abd479d2
│       ├── 7148b8e7abb56ecfd219ede7c2fda5d97d295ae2b917be07777150552f76fd48
│       ├── 79c5b73accaebb7d34ee7b09e8308a4113e750020454553dc1d40405818fb044
│       ├── 7a9079a68382a3a059d2e3c304f6c7bf78cdfa711e1ee797a1069c0916702a32
│       ├── 8932ee3cfac5c28298dbc898fc6772d6e9c761853385abb57fd06b991039d01a
│       ├── 90deda4aa2cb1a8267e2827a430db2537c47188b6b455e6ff3b977f1583ee398
│       ├── 9536443410f3f4bb4bbaaf9a884c04f3d6a72fb4245e24150fa1b11a3a1af691
│       ├── ade74ca2ab4aeb242524125bf94b9bb733c749f3e1674f4aee39c96987e1f10e
│       ├── c984433fe781e3e178f8c7c43a643b335b01cf68536c9382afd6a16fe0acbc3a
│       ├── d13d50ed234e25bfbe91e04d26cf983a9aa77cd3b3f35b254a906b29695833b7
│       └── ec9443cd7a3f822a0fbfb0424f5e219f75749af8d917cbfb012daa2aeca599b8
├── containers
│   └── 3c12fb559cc5a4191ceee4e0e7fe8b173cf67cddd18f36735ed4c3efe542e729
│       ├── 3c12fb559cc5a4191ceee4e0e7fe8b173cf67cddd18f36735ed4c3efe542e729-json.log
│       ├── checkpoints
│       ├── config.v2.json
│       ├── hostconfig.json
│       ├── hostname
│       ├── hosts
│       ├── resolv.conf
│       ├── resolv.conf.hash
│       └── shm
├── image
│   └── aufs
│       ├── distribution
│       ├── imagedb
│       ├── layerdb
│       └── repositories.json
├── network
│   └── files
│       └── local-kv.db
├── plugins
│   ├── storage
│   │   └── blobs
│   └── tmp
├── swarm
├── tmp
├── trust
└── volumes
    └── metadata.db

With the command sudo docker images, you might find that you have n images (2 in my context), SQN, with command docker images -a you might find that you have n times (8 in my context) what appears without the -a, is that, by default, the command does not list the "intermediate".

$ sudo docker images 
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
skype               latest              fdbb095b559c        3 months ago        584MB
debian              stable              58cf158c4bd6        3 months ago        123MB

SQN

$ sudo docker images -a
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
skype               latest              fdbb095b559c        3 months ago        584MB
<none>              <none>              e8d86bada138        3 months ago        584MB
<none>              <none>              b9ccc42ebb18        3 months ago        584MB
<none>              <none>              e0d5c965fbb2        3 months ago        584MB
<none>              <none>              e7a97b82e06a        3 months ago        584MB
<none>              <none>              886fcead9731        3 months ago        584MB
<none>              <none>              25842c5c01f2        3 months ago        584MB
<none>              <none>              85254cda0f92        3 months ago        584MB
<none>              <none>              08e9b7c1a0df        3 months ago        584MB
<none>              <none>              fe9d47a01aff        3 months ago        584MB
<none>              <none>              cbfe10f545a1        3 months ago        584MB
<none>              <none>              944c17b0bc54        3 months ago        584MB
<none>              <none>              bda07b9cf4ca        3 months ago        584MB
<none>              <none>              dbf4386143ec        3 months ago        584MB
<none>              <none>              c3cf8fa7450a        3 months ago        584MB
<none>              <none>              bd374470d432        3 months ago        449MB
<none>              <none>              c7d7c7ec8796        3 months ago        396MB
<none>              <none>              d64937d09002        3 months ago        376MB
<none>              <none>              1d5c66ae3575        3 months ago        320MB
<none>              <none>              78c0a643553e        3 months ago        143MB
<none>              <none>              791c39f99208        3 months ago        123MB
<none>              <none>              77d09a74fa9e        3 months ago        123MB
<none>              <none>              4e4fc161ac04        3 months ago        123MB
debian              stable              58cf158c4bd6        3 months ago        123MB

Typo $ docker --help to see the list of commands.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.