O'Reilly logo

Docker: Creating Structured Containers by Scott Gallagher, Allan Espinosa, Russ McKendrick, Santosh Kumar Konduri, Vaibhav Kohli, Rajdeep Dua, Neependra Khare, Oskar Hane, Shrikrishna Holla, Vinod Singh, Jeeva S. Chelladhurai, Pethuru Raj

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Docker Machine commands

Now that we can deploy Docker hosts locally and to the cloud environments, we need to know how we can manage and manipulate these Docker hosts. Let's take a look at all the commands Docker Machine has to offer.

Note

Note that as we previously created these hosts we were given output on how to target them for use with Docker Machine.

On running the docker-machine create command, you should receive an output similar to this:

INFO[0041] To point your Docker client at it, run this in your shell: $(docker-machine env dev2)

This is how you can set the default to target Docker hosts with Docker Machine. Keep this in mind, when we are looking at the following commands:

  • config
  • env
  • inspect
  • kill
  • restart
  • rm
  • start
  • stop
  • active
  • ip
  • ls
  • scp
  • ssh
  • upgrade

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required