How can I specify Ubuntu as my Docker-Machine VM?

I am trying to use Docker-machine on my Mac, and I understand a VM will be brought up to run docker engines (and the containers launched from here).

However, the default VM seems to run a non Ubuntu (neither CentOS) distro. Can I make the VM run Ubuntu?

Hi, I guess it is not really a VM, just an OS-service layer abstracted through mainly the lxc group, but also the libvirt, systemd-nspawn, and libcontainer. Given this why it would matter what the host runs? Inside the container you don’t see what’s hosting it.

If the host isn’t running Linux then you do need a VM. That having been said, I rarely need to access it directly; on either the Docker for Mac or Docker Machine setups, I can run docker commands from an ordinary Terminal window and they work fine, and I don’t usually care what’s in between.

The other approach is, I don’t think there’s any technical reason you couldn’t just install Ubuntu in a VM and install Docker on that. I think the Docker Machine Virtualbox setup is slightly customized, but mostly it has a fixed network setup and shares parts of the host filesystem with the VM.