# vim: sw=4 ts=4 sts=4 et tw=72 :
# force any errors to cause the script and job to end in failure
-set -xeu -o pipefile
+set -xeu -o pipefail
# Ensure that necessary variables are set to enable noninteractive mode in
# commands.
export DEBIAN_FRONTEND=noninteractive
-# we need garethr-docker in our puppet manifest to install docker
-# cleanly
-puppet module install garethr-docker --version 4.1.1
+# additional kernel packages required for docker to fix
+# aufs failed: driver not supported
+echo "---> Installing Additional kernel packages required for docker"
+apt-get update
+apt-get install "linux-image-extra-$(uname -r)" linux-image-extra-virtual
+modprobe aufs
+
+# Install and configure docker. Use puppetlabs docker which supports
+# Ubuntu 16.04
+puppet module install puppetlabs-docker_platform --version 2.2.1
# do the package install via puppet so that we know it actually installs
# properly and it also makes it quieter but with better error reporting