Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install Docker on CentOS

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article is about how to install Docker on CentOS. Xiaobian thinks it is quite practical, so share it with everyone for reference. Let's follow Xiaobian and have a look.

Installing Docker on CentOS

profile

Docker is an encapsulation of Linux containers, providing an easy-to-use container interface. It is currently the most popular Linux container solution. Linux container is another virtualization technology developed by Linux. Simply speaking, Linux container does not simulate a complete operating system, but isolates the process, which is equivalent to a protective layer outside the normal process. For the process inside the container, the various resources it touches are virtual, thus achieving isolation from the underlying system. Docker packages an application and its dependencies in a file. Running this file creates a virtual container. Programs run in this virtual container as if they were running on a real physical machine. With Docker, you don't have to worry about the environment.

installation steps

1 Check Centos kernel version

use the command

uname -r

Explain the following command

uname is used to print information about the current system

-r Displays the kernel release version

From the above information we can see that our kernel version is 3.10.0

Note: Docker requires CentOS kernel versions higher than 3.10. Check out the prerequisites on this page to verify that your CentOS version supports Docker.

2 Update yum to the latest

yum update -y

Read this order.

Update: Update all installed software

-y: Skip the question, go straight through.

3 Uninstalling older versions

yum remove docker docker-common docker-selinux docker-engine

remove: Remove the uninstall software. I haven't installed it before, so it's like this

4 Use yum to install some tools needed to install docker

yum install -y yum-utils device-mapper-persistent-data lvm2

5 Setting up yum sources

command is as follows

yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.rep

--add-repo : add yum source followed by add yum source address

6 View all docker versions, docker versions in yum

yum list docker-ce --showduplicates | sort -r

list List of software

sort sort

-r in reverse order

7 Select a version to install

command is as follows

yum install docker-ce-18.06.3.ce -y

-y installation process is not asked, directly allow the following screenshot is part

8 Start docker

systemctl start docker

systemctl service management operation command, this command only exists centos7

start starts the service, and the following parameter is to start the scanning service

9 Settings boot docker

systemctl enable docker

enable Required parameter for booting a service setting

10 Verify successful installation

docker –version

--version View version

Thank you for reading! About "how to install Docker on CentOS" this article is shared here, I hope the above content can have some help for everyone, so that everyone can learn more knowledge, if you think the article is good, you can share it to let more people see it!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report