Docker Community Forums

Share and learn in the Docker community.

Docker Machine beginner question


I want to use docker machine on Ubuntu to create docker hosts, it seems driver parameter is must for this. I have following doubts.

  1. Does docker machine create a container with docker installed? i.e similar to any docker container but with docker installed which shares the same host operating system kernel?


  1. Docker Machine creates VM ( which runs in its own OS) depending the driver used, with docker installed? if this is true, what is the size of the created docker host?


Docker Machine allows you to create and manage virtual machines, using a driver, and deploying a small Linux-based OS that has Docker pre-installed.

What size?

du -h ~/.docker/machine/machines/host-1/
76K	/Users/joaofernandes/.docker/machine/machines/host-1//host-1/Logs
92K	/Users/joaofernandes/.docker/machine/machines/host-1//host-1
388M	/Users/joaofernandes/.docker/machine/machines/host-1/

But if you’re already running Ubuntu, maybe you don’t need Docker Machine, since you can install Docker directly on Ubuntu. Most people using Docker Machine were doing it to run Docker on a Mac or Windows, and now you can use Docker for Mac and Docker for Windows.

Thanks for the answer.

Yes. I have docker installed on my Ubuntu. Just to experiment, I want to make one of my container as docker host using docker machine. is it possible? does it makes sense?

And what flavour of Linux is used for docker host created by docker machine?


Docker machine creates Linux vms based on the boot2docker image. You can learn more about it here.

I’m not sure using Docker Machine makes sense, since it all depends on your use case. But you already have Docker running natively on your Ubuntu, so I’m not sure if there’s any use case for using vms to run something you could do natively.