Where is / var / lib / docker located on Mac / OS X

I am looking for the /var/lib/docker folder on my Mac after installing docker for Mac.

With docker info I get

  Containers: 5 ... Server Version: 1.12.0-rc4 Storage Driver: aufs Root Dir: /var/lib/docker/aufs Backing Filesystem: extfs Dirs: 339 Dirperm1 Supported: true ... Name: moby ID: LUOU:5UHI:JFNI:OQFT:BLKR:YJIC:HHE5:W4LP:YHVP:TT3V:4CB2:6TUS Docker Root Dir: /var/lib/docker Debug Mode (client): false .... 

But I do not have the /var/lib/docker directory on my host.

I checked /Users/myuser/Library/Containers/com.docker.docker/ but could not find anything. Any idea where it is located?

+106
docker macos
Jul 22 '16 at 17:44
source share
5 answers

See this answer

When using the Docker app for Mac, it seems that the containers are stored in a virtual machine located at:

~ / Library / Containers / com.docker.docker / Data / com.docker.driver.amd64-Linux / Docker.qcow2

+45
Sep 02 '16 at 7:52
source share

As mentioned in the answers above, you will find it in:
screen ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty

After running tty, you can go to /var/lib/docker

+125
Dec 19 '16 at 16:22
source share

Other answers here are out of date if you are using Docker for Mac.

Here's how I managed to get into the VM. Run the command:

screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty

This is the default path, but you may need to do this first: cd ~/Library/Containers/com.docker.docker/Data/vms

and then ls to see which directory your virtual machine is in, and replace "0" accordingly

When you are inside, you can just see a blank screen. Press the Enter key.

This page explains that to exit the virtual machine you need to press "Ctrl-a" and then "d".

+42
Dec 12 '18 at 20:10
source share

This path comes from the Docker Host (not from MacOS) "Dockers for Mac applications", where the "virtual" virtual machine is "by default", and the mentioned path is specified inside this virtual machine (for sure), now in "Docker for Mac Application" There is an image of Docker.qcow2 which is qemu base vm. To jump inside this path VM @ mik-jagger is ok (but there are a few more)

+1
Mar 20 '17 at 14:46
source share

I would say the file:

 /var/run/docker.sock 

Actually on:

 /Volumes/{DISKNAME}/var/run/docker.sock 

If you run this, it should prove it, if your VirtualBox 5.2.8 or later and the share for /Volumes configured to be automatically mounted and permanent. And you created the default docker machine in this version of Virtualbox:

 #!/bin/bash docker run -d --restart unless-stopped -p 9000:9000 \ -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer \ --no-auth 

Then go to Portainer at: 192.168.99.100:9000 or localhost: 9000

0
Apr 14 '18 at 1:52
source share



All Articles