Install the latest Docker Engine on Fedora using the repository

Configurare noua (How To)

Situatie

To install Docker Engine, you need a maintained version of one of the following Fedora versions:

Fedora 37
Fedora 38

Uninstall old versions 

Older versions of Docker went by the names of docker or docker-engine. Uninstall any such older versions before attempting to install a new version, along with associated dependencies.

$ sudo dnf remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-selinux \
docker-engine-selinux \
docker-engine

dnf might report that you have none of these packages installed.Images, containers, volumes, and networks stored in /var/lib/docker/ aren’t automatically removed when you uninstall Docker.

Install using the rpm repository 

Before you install Docker Engine for the first time on a new host machine, you need to set up the Docker repository. Afterward, you can install and update Docker from the repository.

Set up the repository

Install the dnf-plugins-core package (which provides the commands to manage your DNF repositories) and set up the repository.

$ sudo dnf -y install dnf-plugins-core
$ sudo dnf config-manager –add-repo https://download.docker.com/linux/fedora/docker-ce.repo

Install Docker Engine, containerd, and Docker Compose:

sudo dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

If prompted to accept the GPG key, verify that the fingerprint matches 060A 61C5 1B55 8A7F 742B 77AA C52F EB6B 621E 9F35, and if so, accept it.

This command installs Docker, but it doesn’t start Docker. It also creates a docker group, however, it doesn’t add any users to the group by default.

Start Docker

$ sudo systemctl start docker

Verify that the Docker Engine installation is successful by running the hello-world image.

$ sudo docker run hello-world

This command downloads a test image and runs it in a container. When the container runs, it prints a confirmation message and exits.

Solutie

Tip solutie

Permanent

Voteaza

(3 din 9 persoane apreciaza acest articol)

Despre Autor

Leave A Comment?