Docker is a popular open-source containerization platform that allows developers to package their applications into containers. Fedora Linux is a popular distribution of Linux that is known for its cutting-edge technologies and open-source software. In this article, we will be discussing how to install Docker on Fedora 38/37 step-by-step.
- Pre-Installed Fedora 38/37 (64-bit version)
- Regular User with Sudo Rights
- Internet Connectivity
Step 1: Update Fedora
Before installing Docker, it is important to update your system to ensure that you have the latest software packages. Open the terminal and run following dnf command to install latest updates
$ sudo dnf update
Once all the updates are installed then reboot your system,
$ sudo reboot
Step 2: Install Docker
To install Docker on Fedora 38/37, you will need to add official Docker repository to your system. Execute beneath commands to enable docker repository
$ sudo dnf install dnf-plugins-core -y $ sudo dnf config-manager --add-repo=https://download.docker.com/linux/fedora/docker-ce.repo
Next, update your package cache:
$ sudo dnf makecache
Finally, install latest Docker by running below command
$ sudo dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
Command above will install the latest Docker engine, the Docker command-line interface, docker-compose and the containerd runtime.
Step 3: Start and Enable Docker Service
After successful installation of docker, you will need to start and enable it’s service so that it starts automatically at boot, run following systemctl commands.
$ sudo systemctl start docker $ sudo systemctl enable docker $ sudo systemctl status docker
Step 4: Verify Installation
In order to verify that Docker has been installed correctly, try to spin up a container using hello-world image,
$ sudo docker run hello-world
Above command will download a test image and run it in a container. If everything is working correctly, you should see a message indicating that Docker is running properly.
In conclusion, Docker is a powerful tool that allows developers to package their applications into containers. Installing Docker on Fedora Linux is a straightforward process that can be completed in just a few steps. By following the steps outlined in this article, you can get started with Docker on Fedora Linux and begin using containers to streamline your development workflow.