Guide Configure Docker on Rocky Linux

Hi everyone, today I want to talk about the Docker configuration on Rocky Linux. First, we just need some requirements:
1) 2 GB RAM or higher
2) 2 vCPU / CPU (64-bit Processor)
3) Minimal Installed Rocky Linux 9/8
4) Sudo User with privileges
5) 20 GB Free Space on /var
6)1 Nic Card
7) Stable Internet Connection.

First step u just need check updates
$sudo dnf update -y
$sudo dnf upgrade
Second step configure Docker Repository and install Docker:
$ sudo dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
then run:
$ sudo dnf install -y docker-ce
Output will like installation complete.
Step Three Start and enable docker service.
Once docker is installed then start and enable its service using following systemctl commands:
$ sudo systemctl start docker
$ sudo systemctl enable docker
To verify the status of docker run,
$ sudo systemctl status docker
If you wish to allow local user to mange and run docker commands with sudo, then add the user to docker group using beneath command.
$ sudo usermod -aG docker $USER
$ newgrp docker
Execute following docker command to view its version:
$ docker --version
Step Four Test Docker:
$ docker run hello-world
Via this command u can check your Docker installation and output will be like Hello from Docker!
Last Step install docker compose:
$ sudo dnf install docker-compose-plugin -y

Thanks for your attention XD
 
Son düzenleyen: Moderatör:

Yeni konular

Geri
Yukarı