Skip to content

Instantly share code, notes, and snippets.

@tsaqib
Created May 16, 2016 04:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tsaqib/c355495947dc4a4d3ec45397482edcff to your computer and use it in GitHub Desktop.
Save tsaqib/c355495947dc4a4d3ec45397482edcff to your computer and use it in GitHub Desktop.
Docker installer script for CentOS 7.2
# Docker installation script for CentOS 7.2 on Azure
# Usage: execute sudo -i, first.
# wget -q -O - "$@" https://gist.githubusercontent.com/tsaqib/c355495947dc4a4d3ec45397482edcff/raw/ --no-cache | sh
# After running the script reboot and check whether docker is running.
yum -y update
tee /etc/yum.repos.d/docker.repo <<-'EOF'
[dockerrepo]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/$releasever/
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg
EOF
yum install -y docker-engine
service docker start
usermod -aG docker $(whoami)
chkconfig docker on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment