The tutorial for compiling and installing Docker on the CentOS 8 Stream system is as follows:
-
First, make sure your CentOS 8 Stream system is up to date and has the necessary packages and dependencies installed. You can update your system and install necessary packages with the following commands:
sudo dnf update sudo dnf install -y yum-utils device-mapper-persistent-data lvm2
-
Add Docker's official repository. Run the following command:
sudo dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
-
Install Docker-engine. Run the following command:
sudo dnf install docker-ce
-
Start the Docker service and set it to start automatically at boot:
sudo systemctl start docker sudo systemctl enable docker
-
Verify that the Docker installation was successful. Run the following command, which should output Docker version information:
docker version
-
(Optional) Add the current user to the docker user group to run Docker commands without using the sudo command:
sudo usermod -aG docker $USER
Please log out and log back in for the changes to take effect.
You have now successfully installed Docker on your CentOS 8 Stream system. You can use docker
commands to manage and run containers.
Note that the above tutorial is based on the method of installing Docker by adding the official Docker repository. It is also possible to install Docker in other ways, such as using the binaries or using other repositories. Depending on your needs and environment, appropriate adjustments may be required.