Skip to content

Instantly share code, notes, and snippets.

@cmackenzie1
Last active April 18, 2018 01:05
Show Gist options
  • Save cmackenzie1/f484cc63becf05edcb9527710f5669bd to your computer and use it in GitHub Desktop.
Save cmackenzie1/f484cc63becf05edcb9527710f5669bd to your computer and use it in GitHub Desktop.
CentOS 7 Docker Userdata
# Update packages
yum update -y --security
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
cat << EOF > /etc/yum.repos.d/centos-extras.repo
[centos-extras]
name=centos
baseurl=http://mirror.centos.org/centos/7/extras/x86_64/
gpgcheck=0
enabled=1
EOF
# Install dependencies
yum install -y yum-utils device-mapper-persistent-data lvm2
# Add Docker CE Repo
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
# Install latest version
yum install -y docker-ce
# Enable then start Docker
systemctl enable docker
systemctl start docker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment