install-docker.sh 635 Bytes
Newer Older
1
#!/bin/bash
Markus Frosch's avatar
Markus Frosch committed
2
3
4
5
6
7
8
9
10
11
12
13
14
#
# This script helps us to prepare a Docker host for the build system
#
# It is used with Docker Machine to install Docker, plus addons
#
# See --engine-install-url at docker-machine create --help

set -e

run() {
  (set -x; "$@")
}

15
16
17
18
19
20
21
22
sudo mkdir -p /etc/docker

cat <<EOF |sudo tee /etc/docker/daemon.json >/dev/null
{
  "registry-mirrors": ["https://mirror.gcr.io"]
}
EOF

Markus Frosch's avatar
Markus Frosch committed
23
24
25
26
27
28
29
echo "Installing Docker via get.docker.com"
run curl -LsS https://get.docker.com -o /tmp/get-docker.sh
run sh /tmp/get-docker.sh

echo "Installing QEMU and helpers"
run sudo apt-get update
run sudo apt-get install -y qemu-user-static binfmt-support