Skip to content

Instantly share code, notes, and snippets.

@disulfidebond
Last active February 22, 2018 05:45
Show Gist options
  • Save disulfidebond/12a3d0ee14e239011f9f7ed46a69cbec to your computer and use it in GitHub Desktop.
Save disulfidebond/12a3d0ee14e239011f9f7ed46a69cbec to your computer and use it in GitHub Desktop.
Setup for Docker on Ubuntu Xenial xerus
#!/bin/sh
sudo apt-get update
sleep 1
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
echo ''
echo 'Check for the last 8 chars of fingerprint'
echo 'hint: look to the end of the long fingerprint string'
echo ''
echo 'If GPG key is not found, STOP by pressing Ctrl-C'
echo ''
echo 'Script will continue automagically in 10 seconds...'
sleep 10
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
echo 'The script needs to pause to ensure files are copied and directories have been updated.'
sleep 10
echo 'Continuing'
sudo apt-get update
sleep 1
echo 'To install a specific Docker version, STOP the script by pressing Ctrl-C'
echo 'Then install a specific version of Docker using '
echo 'sudo apt-get install docker-ce=<VERSION>'
echo ''
echo 'To trust a random person on the Internet and the Force, do nothing, and '
echo 'in 10 seconds the script will install the latest version of Docker CE'
echo ''
sudo apt-get install docker-ce
sleep 1
echo ''
echo 'Checking that Docker was installed successfully.'
echo ''
sleep 1
echo 'You should see Hello from Docker'
echo ''
sleep 2
sudo docker run hello-world
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment