Tuesday, December 29, 2015

Docker Machine Introduction

This is a short post that introduces the docker-machine tool, which is part of the docker toolbox.

Overview

Docker-machine is a command line interface (CLI) dedicated to manage virtualization environments in order to provision a minimal docker environment.

Virtualization environments can be hypervisors (VMware, VirtualBox)  or cloud providers (AWS, Azure, etc) . Docker-machine uses drivers to manage virtualization environments.You can find the complete list of supported drivers here.

Fig. 1 - Local and Remote Virtual Machines

Since Docker only runs on Linux, each Virtual Machine is created with a Linux based Operating System. For local VM, the base OS is boot2docker and for remote VM within a cloud, the base OS is Ubuntu.

Fig. 2 - Virtual Machine creation
You can choose other Operating System (list) from:

  • RancherOS
  • Debian
  • RedHat Enterprise Linux
  • CentOS
  • Fedora

but be aware that, except for RancherOS, all other OS are considered as experimental.

When using a cloud provider, it's possible to specify the desired image that will serve to create the Virtual Machine. You will then use the corresponding driver option.


Finally, docker-machine will configure the docker client to connect to the docker engine created previously:

Fig. 3 - Docker client configuration

The configuration is done through environment variables within the current user session:

  • DOCKER_TLS_VERIFY
  • DOCKER_HOST
  • DOCKER_CERT_PATH
  • DOCKER_MACHINE_NAME

The docker client will retrieve the values of these environment variables and use them to establish a connection to the Docher Engine and manage it.

Installation

Docker-machine can be installed through the docker toolbox package (recommended) or directly following this documentation.

4 comments:

  1. Wow it is really wonderful and awesome thus it is very much useful for me to understand many concepts and helped me a lot. it is really explainable very well and i got more information from your blog.

    Android Training in Chennai

    ReplyDelete
  2. Thank you for the fresh content and information you provide. This really helps learner like me. Keep sharing knowledge. Happy to read.

    SEO Company in India|Digital Marketing Company in Chennai

    ReplyDelete
  3. Excellent and very cool idea and the subject at the top of magnificence and I am happy to this post..Interesting post! Thanks for writing it.What's wrong with this kind of post exactly? It follows your previous guideline for post length as well as clarity.
    Java Training in Chennai

    ReplyDelete