aboutsummaryrefslogtreecommitdiffstats
path: root/build/docker/ubuntu-builder/install_docker.sh
diff options
context:
space:
mode:
authorJonas Bjurel <jonas.bjurel@ericsson.com>2016-09-30 20:28:22 +0200
committerJonas Bjurel <jonas.bjurel@ericsson.com>2016-09-30 20:43:13 +0200
commitaf2db33a0ebab98700c3c03ea84a6ba9b987c5b5 (patch)
tree0b789b555d1d62af4e80aea8d802998a32573ad3 /build/docker/ubuntu-builder/install_docker.sh
parent095442c4bdf437531eae2aecd364e74d756757fd (diff)
Preparing the experimental branch for improved Danube CI/CD experimentsexperimental
Fast forwarded to commit:cf93e6ee11c96de090b04196cc96b4a6b0948928 Change-Id: I13d10d870e8ffc7317ab03f8810592d5b2205875 Signed-off-by: Jonas Bjurel <jonas.bjurel@ericsson.com>
Diffstat (limited to 'build/docker/ubuntu-builder/install_docker.sh')
-rwxr-xr-xbuild/docker/ubuntu-builder/install_docker.sh36
1 files changed, 36 insertions, 0 deletions
diff --git a/build/docker/ubuntu-builder/install_docker.sh b/build/docker/ubuntu-builder/install_docker.sh
new file mode 100755
index 000000000..47c3a52ec
--- /dev/null
+++ b/build/docker/ubuntu-builder/install_docker.sh
@@ -0,0 +1,36 @@
+#!/bin/bash
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+# From prepare-build-env.sh of Fuel
+# Check if docker is installed
+if hash docker 2>/dev/null; then
+ echo "Docker binary found, checking if service is running..."
+ ps cax | grep docker > /dev/null
+ if [ $? -eq 0 ]; then
+ echo "Docker is running."
+ else
+ echo "Process is not running, starting it..."
+ sudo service docker start
+ fi
+else
+ # Install docker repository
+ # Check that HTTPS transport is available to APT
+ if [ ! -e /usr/lib/apt/methods/https ]; then
+ sudo apt-get update
+ sudo apt-get -y install -y apt-transport-https
+ fi
+ # Add the repository to APT sources
+ echo deb http://mirror.yandex.ru/mirrors/docker/ docker main | sudo tee /etc/apt/sources.list.d/docker.list
+ # Import the repository key
+ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
+ # Install docker
+ sudo apt-get update
+ sudo apt-get -y install lxc-docker-1.7.1
+fi