Installing Rancher 2.0 on Ubuntu 18.04

# currently Rancher 2.0 does not support latest docker, we use the xenial targeted packages
curl -fsSL | apt-key add -
add-apt-repository "deb$(. /etc/os-release; echo "$ID") xenial stable"
apt-get update && apt-get install -y docker-ce=$(apt-cache madison docker-ce | grep 17.03 | head -1 | awk '{print $3}')
apt-mark hold docker-ce
nano /lib/systemd/system/docker.service
    ExecStart=/usr/bin/dockerd $DOCKER_OPTS -H fd://
nano /etc/default/docker
    DOCKER_OPTS="--iptables=false --dns --dns --dns --dns"
systemctl daemon-reload
systemctl restart docker
# copy certificates to /etc/ssl/private
docker run -d --name rancher --restart=unless-stopped -p 443:443 -v /etc/ssl/private/${CERT_DOMAIN_FILENAME}.crt:/etc/rancher/ssl/cert.pem -v /etc/ssl/private/${CERT_DOMAIN_FILENAME}.key:/etc/rancher/ssl/key.pem -v /srv/rancher:/var/lib/rancher rancher/rancher:latest