#!/bin/bash
set -eux

# install docker-engine
#wget -qO- https://get.docker.com/ | bash


# following are the steps from docs.docker.com for installing docker-engine
apt-get -y --force-yes install apt-transport-https ca-certificates
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
echo "deb https://apt.dockerproject.org/repo ubuntu-$DIB_RELEASE main" >> /etc/apt/sources.list.d/docker.list
apt-get update
apt-get -y --force-yes install linux-image-extra-$(uname -r) linux-image-extra-virtual

# install specific version of docker-engine.
# issue noticed with latest version (1.12.3) of docker-engine during 'docker load'
# TODO: fix issue with latest version
apt-get -y --force-yes install docker-engine=1.12.2-0~${DIB_RELEASE}
