2 ##############################################################################
3 # Copyright (c) 2015 Ericsson AB and others.
4 # stefan.k.berg@ericsson.com
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
11 # From prepare-build-env.sh of Fuel
12 # Check if docker is installed
13 if hash docker 2>/dev/null; then
14 echo "Docker binary found, checking if service is running..."
15 ps cax | grep docker > /dev/null
17 echo "Docker is running."
19 echo "Process is not running, starting it..."
20 sudo service docker start
23 # Install docker repository
24 # Check that HTTPS transport is available to APT
25 if [ ! -e /usr/lib/apt/methods/https ]; then
27 sudo apt-get -y install -y apt-transport-https
29 # Add the repository to APT sources
30 echo deb http://mirror.yandex.ru/mirrors/docker/ docker main | sudo tee /etc/apt/sources.list.d/docker.list
31 # Import the repository key
32 sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
35 sudo apt-get -y install lxc-docker-1.7.1