Gary Wu | 1ff5667 | 2018-01-17 20:51:45 -0800 | [diff] [blame] | 1 | #!/bin/bash -x |
| 2 | printenv |
| 3 | |
| 4 | echo `hostname -I` `hostname` >> /etc/hosts |
| 5 | mkdir -p /etc/docker |
| 6 | cat > /etc/docker/daemon.json <<EOF |
| 7 | { |
| 8 | "insecure-registries" : ["__docker_proxy__"] |
| 9 | } |
| 10 | EOF |
| 11 | cat > /etc/apt/apt.conf.d/30proxy<<EOF |
| 12 | Acquire::http { Proxy "http://__apt_proxy__"; }; |
| 13 | Acquire::https::Proxy "DIRECT"; |
| 14 | EOF |
| 15 | apt-get -y update |
| 16 | apt-get -y install docker.io |
| 17 | usermod -aG docker ubuntu |
| 18 | docker run --restart unless-stopped -d -p 8080:8080 rancher/server:v1.6.10 |