#!/bin/bash set -ex cat << EOF | sudo tee /etc/hosts 127.0.0.1 localhost 192.168.1.10 master 192.168.1.21 worker1 192.168.1.22 worker2 192.168.1.23 worker3 EOF sudo apt-get update sudo apt-get install -y \ apt-transport-https \ ca-certificates \ curl \ software-properties-common curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable" sudo apt-get update sudo apt-get install -y docker-ce=18.06.0~ce~3-0~ubuntu curl -s http://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - cat <