One of the nice things about using docker-machine
and boot2docker is that it makes the difference between the docker-daemon and the localhost machine very clear. This helps later on when you start deploying your containers to a remote environment. Yes it adds complexity for the (beginning) user, however in the long run you will have to learn how it works anyway.
I like the transparency of the native docker implementation, it’s very easy however it does introduce direct (security) risks because exposed ports are by default exposed on you machine and thus on the network on which your connected?
I tried putting docker for mac more in a stealthmode by using pinata set native/port-forwarding false
and that works fine.
But now I very much need to be able to know the ip-address of the local xhyve vm and since docker.local
is not available anymore and wasn’t always stable in earlier beta’s I just would like a command for determining the address reliably.
something like pinata get native/ip-address
would be great.
As a workaround I added some tips together and now use:
export DOCKER_VM_IP=`docker run --rm --net host alpine ip addr show eth0 | sed -En "s/^.*inet (.+)\/.*$/\1/p"`
but that’s to difficult in my opinion and dependent on running a container. Nice part is that it also works when using docker-machine and having a docker TLS connection configured.