Problem scneario
In Google Cloud Platform you have a Debian Linux server. You want to install Docker on it. What do you do?
Solution
1. Create a file called dockerinstall.sh in the /tmp/ directory with the following content:
apt-get -y update
apt-get install -y apt-transport-https ca-certificates wget software-properties-common
wget https://download.docker.com/linux/debian/gpg
apt-key add gpg
echo "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | sudo tee -a /etc/apt/sources.list.d/docker.list
apt-get -y update
apt-get -y install docker-ce
2. Run this script with sudo (e.g., sudo bash /tmp/dockerinstall.sh
). It may take 10 minutes and appear to stall. This is normal.