Install docker on CentOS 8 | Rocky Linux 8

0 / 113
Install docker on linux
 

Installing docker on Centos8/Rocky Linux8

You can get repository for docker for you OS from below location 
1
https://download.docker.com/linux/
Configure the Docker Package Repository and install Docker To install the most recent and stable version of Docker, use the following command to setup its official package repository.
1
# dnf config-manager —add-repo=https://download.docker.com/linux/centos/docker-ce.repo
To install Docker, run the following dnf command
1
# dnf install -y docker-ce
Below is the snippet of docker installation – Docker pull image Start and activate the Docker Service After installing Docker, use the systemctl instructions below to start and activate its service.
1
# systemctl restart docker
1
# systemctl enable docker
1
# systemctl status docker
1
# docker ps
Below is the snippet of docker service restart –
Restart docker image

docker restart

  To test, run a sample nginx container and check using docker ps
1
# docker run -it -d -p 8080:80 nginx
1
# docker ps
1
# curl localhost:8080
Below is the snippet of running nginx docker container
Run docker image

docker run

  I hope you now have the knowledge you need to learn more about installing docker  and perhaps you can utilize it in a project in the future.   Follow us on facebook:- Facebook  & Linkedin:- LinkedIn  

Comments

comments


***Linux, Cloud & Devops Architect & Technical Content Writer*** I am a Linux Enthusiast and Supporter/Promoter of Open Source Technology with over 12+ years of experience in Linux, Cloud and Devops. I am A Technical Content writer for various sites like : Hostbread & Golibrary

Related Posts