aboutsummaryrefslogtreecommitdiffstats
path: root/deployment/heat/onap-oom/rancher_vm_entrypoint.sh
blob: 12ed51f132d6a0d10867c8e4ccbe4c2fecd92e59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash -x
printenv

echo `hostname -I` `hostname` >> /etc/hosts
mkdir -p /etc/docker
if [ ! -z "__docker_proxy__" ]; then
    cat > /etc/docker/daemon.json <<EOF
{
  "insecure-registries" : ["__docker_proxy__"]
}
EOF
fi
if [ ! -z "__apt_proxy__" ]; then
    cat > /etc/apt/apt.conf.d/30proxy<<EOF
Acquire::http { Proxy "http://__apt_proxy__"; };
Acquire::https::Proxy "DIRECT";
EOF
fi
apt-get -y update
apt-get -y install docker.io
usermod -aG docker ubuntu
docker run --restart unless-stopped -d -p 8080:8080 rancher/server:v1.6.14