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
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