sudo dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
sudo dnf makecache
sudo dnf install docker-ce
sudo dnf install docker-compose
Let's check that both Docker & docker-compose have been successfully installed:
docker --version
Docker version 19.03.5, build 633a0ea838
docker-compose --version
docker-compose version 1.24.0, build 0aa59064
Let’s enable and start the docker service.
sudo systemctl enable docker.service
sudo systemctl start docker.service
If you upgraded to Fedora 31 from 30, and all your Docker containers stopped working (throwing the error ERROR: Service 'XXX' failed to build: OCI runtime create failed
), please follow the 3 steps described here:
https://www.reddit.com/r/linuxquestions/comments/dn2psl/upgraded_to_fedora_31_docker_will_not_work/f5sml7f/