I managed to find the containers under directory /var/lib/docker/containers
, but I can\'t find the images.
What are the directories and files under
When using Docker for Mac Application, it appears that the containers are stored within the VM located at:
~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/Docker.qcow2
UPDATE (Courtesy of mmorin):
As of Jan 15 2019 it seems there is only this file:
~/Library/Containers/com.docker.docker/Data/vms/0/Docker.raw
that contains the Docker Disk and all the images and containers within it.
For "Docker Desktop", click on docker system tray icon and click "Settings".
On the Advanced tab, you can see the disk image location.
As answered here, if you're on Mac, it is located at
/Users/MyUserName/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/Docker.qcow2
On Ubuntu you can "play" with images running
sudo baobab /var/lib/docker
Actually, images are stored within /var/lib/docker/aufs/diff
Environment: Windows 10 Pro, docker desktop 2.0.3.0 edge
right-click docker icon in system tray, select settings - advanced :
Disk image location (editable via the browser) :
C:\Users\Public\Documents\Hyper-V\Virtual Hard Disks\DockerDesktop.vhdx
(it's there - Documents directory is hidden)
If anyone need it for scripting purposes, here is a one-line solution.
In POSIX shell, with PCRE enabled grep
, try:
DOCKER_ROOT_DIR="$(docker info 2>&1 | grep -oP '(?<=^Docker Root Dir: ).*')"
In PowerShell:
$DOCKER_ROOT_DIR="$(docker info 2>&1 | foreach {if($_ -match "Docker Root Dir"){$_.TrimStart("Docker Root Dir: ")}})"
Note, when on Windows 10 (as of 10.0.18999.1
), in default configurations, it returns:
C:\ProgramData\Docker
in "Windows containers" mode/var/lib/docker
, in "Linux containers" mode