Using Docker Machine

You can use Docker Machine to launch VMs for various providers. Currently VirtualBox and VMWare(VMWare VSphere, VMWare Fusion) and AWS are supported.

Using Docker Machine with VirtualBox

Before moving forward, you’ll need to have VirtualBox installed. Download it directly from VirtualBox. Once you have VirtualBox and Docker Machine installed, it’s just one command to get RancherOS running.

That’s it! You should now have a RancherOS host running on VMWare Fusion. You can verify that you have a VMWare Fusion VM running on your host.

Using Docker Machine with Hyper-V

Available as of v1.5

You should refer to the documentation of Hyper-V driver, here is an example of using the latest RancherOS URL. We recommend using a specific version so you know which version of RancherOS that you are installing.

If you want to exit out of RancherOS, you can exit by pressing Ctrl+D.

Docker Machine Benefits

With Docker Machine, you can point the docker client on your host to the docker daemon running inside of the VM. This allows you to run your docker commands as if you had installed docker on your host.

To point your docker client to the docker daemon inside the VM, use the following command:

$ eval $(docker-machine env <MACHINE-NAME>)

After setting this up, you can run any docker command in your host, and it will execute the command in your RancherOS VM.

$ docker run -p 80:80 -p 443:443 -d nginx

In your VM, a nginx container will start on your VM. To access the container, you will need the IP address of the VM.

$ docker-machine ip <MACHINE-NAME>

Once you obtain the IP address, paste it in a browser and a Welcome Page for nginx will be displayed.