Merge "Switch to OOM master branch"
[integration.git] / deployment / heat / onap-oom / rancher_vm_entrypoint.sh
1 #!/bin/bash -x
2 printenv
3
4 echo `hostname -I` `hostname` >> /etc/hosts
5 mkdir -p /etc/docker
6 if [ ! -z "__docker_proxy__" ]; then
7     cat > /etc/docker/daemon.json <<EOF
8 {
9   "insecure-registries" : ["__docker_proxy__"]
10 }
11 EOF
12 fi
13 if [ ! -z "__apt_proxy__" ]; then
14     cat > /etc/apt/apt.conf.d/30proxy<<EOF
15 Acquire::http { Proxy "http://__apt_proxy__"; };
16 Acquire::https::Proxy "DIRECT";
17 EOF
18 fi
19 apt-get -y update
20 apt-get -y install docker.io
21 usermod -aG docker ubuntu
22 docker run --restart unless-stopped -d -p 8080:8080 rancher/server:v1.6.14