Docker & Container Runtimes, Mint

How to install Docker Machine on Linux Mint 18 and 18.1

If you’ve read and made use of this article to install Docker on Linux Mint 18 or 18.1, this is the next article in line.

While installing Docker makes it possible to run Docker containers locally on your machine, installing Docker Machine makes it possible to provision servers locally and remotely on supported Cloud service providers like DigitalOcean and AWS with Docker (Engine) pre-installed. Such servers are called Dockerized hosts or managed machines.

So in this article, you’ll learn how to install Docker Machine on Linux Mint 18 or 18.1, with an eye towards using it to provision such machines.

Download and Install Docker Machine

Installing Docker Machine involves downloading its binary to your computer, copying it to the appropriate directory and making it executable. The commands required to get all that done are given in this code block. Note that at the time of this publication, Docker Machine 0.8.2 is the latest, stable release. The development branch is at v0.9.0 RC2. You might want to keep track of the very latest release here.

Install Extra Bash Scripts

With Docker Machine installed, there are three additional Bash scripts needed to be installed that will make using the docker-machine command a bit easier. The scripts, and the functionality they bring to the table, are:

  • docker-machine.bash: This provides command completion for commands, machine names and filepaths
  • docker-machine-prompt.bash: This makes it possible to see the active machine in your shell prompt
  • docker-machine-wrapper.bash: This adds a docker-machine use subcommand to switch the active machine
Related Post:  Persistent storage patterns for Docker in production

The three Bash scripts will need to be linked to the /etc/bash_completion.d directory. The following commands shows how to link all three scripts:

That last file – docker-machine-prompt.bash – requires additional configuration. You need to modify the PS1 environment variable so that it would function correctly. The PS1 environment variable you need to modify is in the .bashrc file under your home directory. Use the follow commands to modify it.

Related Post:  How to upgrade the kernel in Linux Mint 18.1 from 4.4 to 4.8

That’s all you need to do to install Docker Machine on Linux Mint 18 and 18.1. The next step is to start provisioning Dockerized hosts (machines) with it. That will be the subject of the next article, which will be published latest Friday, December 16 (2016).

If you need to look at the code for the three Bash scripts, you’ll find them here. For more information on Docker Machine, click here.

Docker on Linux Mint 18

JOIN OUR NEWSLETTER
Enjoying the article you're reading? Subscribe to our newsletter to receive updates and new articles as soon as they are published - right in your Inbox
We hate spam. Your email address will not be sold or shared with anyone else.
Please share:

We Recommend These Vendors and Free Offers

Launch an SSD VPS in Europe, USA, Asia & Australia on Vultr's KVM-based Cloud platform starting at $5:00/month (15 GB SSD, 768 MB of RAM).

Deploy an SSD Cloud server in 55 seconds on DigitalOcean. Built for developers and starting at $5:00/month (20 GB SSD, 512 MB of RAM).

Want to become an expert ethical hacker and penetration tester? Request your free video training course of Online Penetration Testing and Ethical Hacking

Whether you're new to Linux or are a Linux guru, you can learn a lot more about the Linux kernel by requesting your free ebook of Linux Kernel In A Nutshell.


Leave a Comment

Your email address will not be published. Required fields are marked *

*