Initialising a Ubuntu Box with Vagrant and Docker as a Provider

0
1329

Overview

Docker as you may know is one of the hottest topics in Devops and provisioning containerised infrastructure right now as was evidenced recently at Dockercon in Austin Texas earlier this year.

In this tutorial we will show how to provision a Ubuntu 16.04 box with Docker.

Prerequisites

You will need to install the following on your local machine:

Vagrant Base Images

Hashicorp maintain a library of useful base and custom images on their atlas site. This is where we have found the right Docker enabled box:

https://atlas.hashicorp.com/tknerr/boxes/baseimage-ubuntu-16.04

To start it up enter:

 vagrant init tknerr/baseimage-ubuntu-16.04; vagrant up --provider docker

The Box is pulled from the Hashicorp Atlas repository and installed on your local machine. SSH access your box using:

vagrant ssh