On the EC2 instance A few variable to set:
Run a docker with the docker sock linked and a few variables set:
docker run -t -v /var/run/docker.sock:/run/docker.sock -v $(which docker):/bin/docker -i ubuntu /bin/bash apt-get update && apt-get install -y python-pip && pip install docker-py==1.6.0 export CID=`cat /proc/self/cgroup | grep -o -e "docker-.*.scope" | head -n 1 | sed "s/docker-\(.*\).scope/\\1/"`