The Alpine Linux virtual machine supported by Docker for Mac does not support the devicemapper driver, but can run the overlay2 driver.
There is no interface to manage this configuration. The Docker interface for Mac has been updated. It includes a "Daemon" section in which you can edit the docker.json configuration file.
Get the Docker icon> "Settings"> "Daemon"> "Advanced" and set the storage-driver parameter to overlay2
{ "storage-driver": "overlay2" }
See kojiros for full details.
Editing Manual Settings
You can modify the Docker configuration files on your mac in ~/Library/Containers/com.docker.docker/Data/database .
This directory is a git repository, and it will usually be empty:
$ cd ~/Library/Containers/com.docker.docker/Data/database $ ls -al total 0 drwxr-xr-x 4 user staff 136 28 Sep 02:46 . drwxr-xr-x 20 user staff 680 28 Sep 02:54 .. drwxr-xr-x 11 user staff 374 28 Sep 02:58 .git
There are files in the git database, but
$ git status On branch master Changes not staged for commit: (use "git add/rm <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) deleted: com.docker.driver.amd64-linux/etc/docker/daemon.json deleted: com.docker.driver.amd64-linux/etc/hostname deleted: com.docker.driver.amd64-linux/etc/sysctl.conf ....
To get the previous contents from git, run:
$ git reset
Edit the overlay2 daemon configuration file that now exists to enable the overlay2 storage overlay2 .
$ vi com.docker.driver.amd64-linux/etc/docker/daemon.json
A docker in a virtual machine will need most of /var/lib/docker before you can start with the new storage driver. This is DELETING all your containers, images and volumes! Back up everything you need in advance.
Attach to VM tty with screen ( brew install screen if you don't have one)
$ screen ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty
Log in as root , no password
moby:~
Exit the prompt using ctrl - d
Exit the screen session using ctrl - a , then d
Now you can transfer your changes to mac
$ git commit -m overlay com.docker.driver.amd64-linux/etc/docker/daemon.json
Changes will be automatically activated by Docker when committed, and the virtual machine will restart.
You now have Docker for Mac VM with the overlay2 storage overlay2 . If this does not solve your problems, with some work you can probably figure out how to get devicemapper support working in VM. Steps, as soon as you understand it, anyway.
Note Upgrading to Docker for Mac may cause some oddities. The last update of all my containers / images disappeared from docker ps or docker images . I again had to reset the git repository and restart Docker for my configuration changes to return, and then all the data returned.