blob: 12ed51f132d6a0d10867c8e4ccbe4c2fecd92e59 [file] [log] [blame]
Gary Wu1ff56672018-01-17 20:51:45 -08001#!/bin/bash -x
2printenv
3
4echo `hostname -I` `hostname` >> /etc/hosts
5mkdir -p /etc/docker
Gary Wu3ad596f2018-02-08 07:16:37 -08006if [ ! -z "__docker_proxy__" ]; then
7 cat > /etc/docker/daemon.json <<EOF
Gary Wu1ff56672018-01-17 20:51:45 -08008{
9 "insecure-registries" : ["__docker_proxy__"]
10}
11EOF
Gary Wu3ad596f2018-02-08 07:16:37 -080012fi
13if [ ! -z "__apt_proxy__" ]; then
14 cat > /etc/apt/apt.conf.d/30proxy<<EOF
Gary Wu1ff56672018-01-17 20:51:45 -080015Acquire::http { Proxy "http://__apt_proxy__"; };
16Acquire::https::Proxy "DIRECT";
17EOF
Gary Wu3ad596f2018-02-08 07:16:37 -080018fi
Gary Wu1ff56672018-01-17 20:51:45 -080019apt-get -y update
20apt-get -y install docker.io
21usermod -aG docker ubuntu
Gary Wu57abb1a2018-03-09 13:38:28 -080022docker run --restart unless-stopped -d -p 8080:8080 rancher/server:v1.6.14