# 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-engine
# service docker start
# dnf -y install dnf-plugins-core
# dnf config-manager \
--add-repo \
https://download.docker.com/linux/fedora/docker-ce.repo
# dnf install docker-engine
# service docker start
If you use docker with non-root account, add the account to "docker" group (usermod below is effective after re-login tho the account).
# usermod -a -G docker <you-account-name>
# curl -L "https://github.com/docker/compose/releases/download/1.25.3/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose # chmod +x /usr/local/bin/docker-compose
See https://docs.docker.com/compose/install/ and https://docs.docker.com/engine/installation/ for more detail and up-to-date installation document of Docker Engine and Compose.