2 # From prepare-build-env.sh of Fuel
3 # Check if docker is installed
4 if hash docker 2>/dev/null; then
5 echo "Docker binary found, checking if service is running..."
6 ps cax | grep docker > /dev/null
8 echo "Docker is running."
10 echo "Process is not running, starting it..."
11 sudo service docker start
14 # Install docker repository
15 # Check that HTTPS transport is available to APT
16 if [ ! -e /usr/lib/apt/methods/https ]; then
18 sudo apt-get -y install -y apt-transport-https
20 # Add the repository to APT sources
21 echo deb http://mirror.yandex.ru/mirrors/docker/ docker main | sudo tee /etc/apt/sources.list.d/docker.list
22 # Import the repository key
23 sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
26 sudo apt-get -y install lxc-docker-1.7.1