How Do You Install Docker on Debian 9 in GCP?

Problem scenario
You are running Debian 9 in GCP.  You want to install Docker on this server.  What should you do?

1.  Create a script in /tmp/ call with the following lines of content:

apt-get -y update
apt-get install -y apt-transport-https ca-certificates wget software-properties-common
apt-key add gpg
echo "deb [arch=amd64] $(lsb_release -cs) stable" | sudo tee -a /etc/apt/sources.list.d/docker.list
apt-get -y update
apt-cache policy docker-ce
apt-get -y install docker-ce

2.  Run this command:  sudo bash /tmp/

Leave a comment

Your email address will not be published. Required fields are marked *