Location container docker on host

1

Since I started using docker last year, to directly access the files in my container I used the following steps:

  • docker inspect -f '{{.Id}}' container_id

It returns me the full id container

With the full id container I would go to the directory where the container's files were located:

  • cd / var / lib / docker / aufs / mnt / container_id_complete

But currently when I do this it returns: file or directory not found. I noticed that in the mnt folder there are dozens of diets with full id names but none of them are recent containers.

I tried to see if I found the directory using the command:

  • find -name container_id_complete

but can not find any folder

Does anyone know if docker has made any modifications to this in its latest updates and if so how can I do it to access the container files directly through the host?

OS: Linux Mint 17.3 64bits

Docker: 1.10.3

    
asked by anonymous 31.03.2016 / 19:52

1 answer

2

According to the Docker documentation , from the 1.10 os names of directories where the containers are located within the host are not the same as the containers IDs.

And the filesystems of containers are within /var/lib/docker/aufs/diff/ .

I even ran a test to see if I could find my container within this diff/ directory, and what would be the directory name. The ID of my container being executed:

"Id": "099bc297959fb860f5190f9d14d518071ef9626efd941215e28d054382750f6d"

/var/lib/docker/aufs/diff/7864538e8d46047fc57bcf618472a42972b7e377335dd09695eea1ddf0003676

(I know it's the same container because I put a text file inside it, and I saw that it was in that path inside the host)

OS: Ubuntu 14.04 64bit

Docker: 1.10.3

    
01.04.2016 / 03:38