This time I’m gonna show you how to install Docker CE on Fedora Server.
I will use Fedora because I will install the community edition… the installation of Fedora is not part of this post, also you may use other certified Linux distribution.
I recommend Fedora 29 for this installation because at the moment I’m writing this post there is not an available package for Fedora 30.
A quick installation requires the following steps to be completed:
First we have to install the dnf-plugins-core package which let us manage the DNF repositories:
$ sudo dnf -y install dnf-plugins-core
If you have access to root user then is not necessary to use sudo.
Now, lets set up the stable repository, we run the following command:
$ sudo dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
We should get a message about adding the repository.
If you want to add the nightly or test repositories you can check the following documentation.
Now we have to install Docker, for that run the following command to install Docker and containerd:
$ sudo dnf install docker-ce docker-ce-cli containerd.io
The previous command creates the Docker group. Docker is not started.
To start Docker we must run the following command:
$ sudo systemctl start docker
If you want get the current state of Docker, you can run the following command:
$ sudo systemctl status docker
To verify your installation, let’s download and run a hello world image.
Run the following command:
$ sudo docker run hello-world
The previous command will download a test image and runs it in a container.
Get downloaded images:
$ sudo docker image ls
Get running containers:
$ sudo docker container ps
By the way… if you don’t want to use root user, just create another user and add it to the docker group.