Skip to content

Instantly share code, notes, and snippets.

@hoangdh
Last active October 25, 2022 04:15
Show Gist options
  • Save hoangdh/efa92de8f014f7ddb65fee241a75f4e3 to your computer and use it in GitHub Desktop.
Save hoangdh/efa92de8f014f7ddb65fee241a75f4e3 to your computer and use it in GitHub Desktop.
Install Docker + Docker Compose on CentOS 7
#!/bin/bash
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum install docker-ce docker-ce-cli containerd.io -y
systemctl start docker
systemctl enable docker
curl -sLk "https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
echo "===Done==="
docker-compose -v
docker -v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment