Location of docker images downloaded by Docker (1.9.1) on Mac OS X

后端 未结 11 1179
有刺的猬
有刺的猬 2020-12-07 18:15

Where are the docker images located once they are downloaded from docker hub in Mac OSX. For example if I run a command like:

docker run hello-world
<         


        
11条回答
  •  一向
    一向 (楼主)
    2020-12-07 19:03

    This answer doesn't concern the "boot2Docker" version for MAC. Here I have the Version 17.12.0-ce-mac55, you have to keep in mind that Docker is still running in a VM, the system paths are relative to the VM and not from the Mac Osx system. As it says all is contained in a VM file :

    /Users/MyUserName/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/Docker.qcow2

    Try to run Alpine image with this volume option and the ls command you are able to list the VM host:

    docker run --rm -it -v /:/vm-root alpine:edge ls -l /vm-root

    After this just try :

    docker run --rm -it -v /:/vm-root alpine:edge ls -l /vm-root/var/lib/docker

    Now, you are able to list the docker folder from the WM host

提交回复
热议问题