Skip to content

Instantly share code, notes, and snippets.

@jghorton14
Created September 22, 2020 12:33
Show Gist options
  • Save jghorton14/03af96f99b451fdbab4a2b27aaccdfee to your computer and use it in GitHub Desktop.
Save jghorton14/03af96f99b451fdbab4a2b27aaccdfee to your computer and use it in GitHub Desktop.
Install docker on ubuntu x86
#!/bin/bash
sudo apt-get update
echo "----------Updated---------------"
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
echo "----------Installed packages to allow apt to use a repository over HTTPS---------------"
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
echo "----------Added Dockers official GPG key----------"
sudo apt-key fingerprint 0EBFCD88
echo "----------Verified that you now have the key with the fingerprint---------"
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
echo "--------Set up stable repo--------"
sudo apt-get update
echo "----------Update apt package index--------"
sudo apt-get install docker-ce docker-ce-cli containerd.io
echo "----------Installed docker on x86------"
sudo docker run hello-world
echo "----------Verified working docker-------------"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment