Skip to content

Instantly share code, notes, and snippets.

@philcryer
Last active January 9, 2017 10:05
Show Gist options
  • Save philcryer/29fa2cefa8cff736a624 to your computer and use it in GitHub Desktop.
Save philcryer/29fa2cefa8cff736a624 to your computer and use it in GitHub Desktop.
Install Docker on a fresh Docker Debian Wheezy image
#!/bin/bash
# Install Docker on Debian Wheezy
# gist:: https://gist.github.com/philcryer/29fa2cefa8cff736a624
# install a newer kernel, if we're running one later than version +3.2.x, from backports
if [[ `uname --kernel-release | cut -d"." -f2 | awk '{print substr($0,0,2)}'` -lt "2" ]]; then
echo "** Installing newer (3.2+) kernel from wheezy-backports..."
echo "deb http://http.debian.net/debian wheezy-backports main" >> /etc/apt/sources.list
apt-get update; apt-get install -t wheezy-backports linux-image-amd64 # reboot then run the script again...
fi
# install docker
which curl > /dev/null 2>&1 || { echo "** Installing curl..."; apt-get update; apt-get install curl -yy; }
curl -sSL https://get.docker.com/ | sh
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment