# Docker for Mac

[`docker-for-mac.yml`](./docker-for-mac.yml) contains an example use
of the open source components of Docker for Mac. The example has
support for controlling `dockerd` from the host via `vsudd` and port
forwarding with VPNKit. It requires HyperKit, VPNKit and a Docker
client on the host to run. The easiest way to install these at the
moment is to install a recent version of Docker for Mac.

To build it with the latest Docker CE:

```
$ linuxkit build docker-for-mac.yml
```

To run the VM with a 4G disk:

```
linuxkit run hyperkit -networking=vpnkit -vsock-ports=2376 -disk size=4096M -data-file ./metadata.json docker-for-mac
```

Where the file `./metadata.json` should contain the desired docker daemon
configuration, for example:

```
{
  "docker": {
    "entries": {
      "daemon.json": {
        "content": "{\n  \"debug\" : true,\n  \"experimental\" : true\n}\n"
      }
    }
  }
}
```

In another terminal you should now be able to access docker via the
socket `guest.00000948` in the state directory
(`docker-for-mac-state/` by default):

```
$ docker -H unix://docker-for-mac-state/guest.00000948 ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
```

# Docker for Mac

[`docker-for-mac.yml`](./docker-for-mac.yml) contains an example use
of the open source components of Docker for Mac. The example has
support for controlling `dockerd` from the host via `vsudd` and port
forwarding with VPNKit. It requires HyperKit, VPNKit and a Docker
client on the host to run. The easiest way to install these at the
moment is to install a recent version of Docker for Mac.

To build it with the latest Docker CE:

```
$ linuxkit build -format iso-efi docker-for-mac.yml
```

To run the VM with a 4G disk:

```
linuxkit run hyperkit -networking=vpnkit -vsock-ports=2376 -disk size=4096M -data-file ./metadata.json -iso -uefi docker-for-mac-efi
```

Where the file `./metadata.json` should contain the desired docker daemon
configuration, for example:

```
{
  "docker": {
    "entries": {
      "daemon.json": {
        "content": "{\n  \"debug\" : true,\n  \"experimental\" : true\n}\n"
      }
    }
  }
}
```

In another terminal you should now be able to access docker via the
socket `guest.00000948` in the state directory
(`docker-for-mac-efi-state/` by default):

```
$ docker -H unix://docker-for-mac-efi-state/guest.00000948 ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
```

Update docker for mac sample to use iso-efi format
Update docker for mac sample to use iso-efi format

Signed-off-by: Mario Loriedo <c0a781a7aad4fe4458db63717f9b22669d52e076@gmail.com>
