Edit the following (Can use nano or vim, etc…)
sudo nano /etc/yum.repos.d/docker-ce.repo
Add the following section
[docker-ce-stable]
name=Docker CE Stable – $basearch
baseurl=https://download.docker.com/linux/fedora/$releasever/$basearch/stable
enabled=1
gpgcheck=1
gpgkey=https://download.docker.com/linux/fedora/gpg
Now save the file and run
sudo dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo systemctl start docker
sudo systemctl enable docker <– Auto run at the startup