docker-for-mac: supply the daemon.json via metadata

Previously the docker-for-mac example had a `files` declaration
which wrote `/var/config/docker/daemon.json`. This was probably an
error because the `/var/config` directory is owned by the `metadata`
package. It used to work -- probably by accident -- but doesn't
any more.

This patch switches to using the metadata package to populate the
`daemon.json`.

Signed-off-by: David Scott <dave.scott@docker.com>
This commit is contained in:
David Scott
2017-08-22 11:23:44 +01:00
parent c07309b700
commit 25a05142a3
3 changed files with 9 additions and 6 deletions

View File

@@ -33,7 +33,7 @@ $ moby build -name docker-for-mac base.yml docker-ce.yml
To run the VM with a 500M disk: To run the VM with a 500M disk:
``` ```
linuxkit run hyperkit -networking=vpnkit -vsock-ports=2376 -disk size=500M docker-for-mac linuxkit run hyperkit -networking=vpnkit -vsock-ports=2376 -disk size=500M -data ./metadata.json docker-for-mac
``` ```
In another terminal you should now be able to access docker via the socket `guest.00000947` in the state directory (`docker-for-mac-state/` by default): In another terminal you should now be able to access docker via the socket `guest.00000947` in the state directory (`docker-for-mac-state/` by default):

View File

@@ -23,11 +23,6 @@ services:
"--swarm-default-advertise-addr=eth0", "--swarm-default-advertise-addr=eth0",
"--userland-proxy-path", "/usr/bin/vpnkit-expose-port", "--userland-proxy-path", "/usr/bin/vpnkit-expose-port",
"--storage-driver", "overlay2" ] "--storage-driver", "overlay2" ]
files:
- path: /var/config/docker/daemon.json
contents: '{ "debug": true }'
trust: trust:
org: org:
- library - library

View File

@@ -0,0 +1,8 @@
{
"docker": {
"daemon.json": {
"perm": "0644",
"content": "{ \"debug\": true }"
}
}
}