sudo dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker.repo code example
Example: install docker centos 8
dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo