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 Centos7

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

This article mainly shows you "how to install docker on Centos7", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to install docker on Centos7" this article.

Official website reference address

Installation manual address:

Https://docs.docker.com/install/linux/docker-ce/centos/

Docker warehouse address:

Https://hub.docker.com

First, install docker

1. Docker requires that the kernel version of the CentOS system is higher than 3.10. Check the prerequisites on this page to verify whether your CentOS version supports Docker.

Check your current kernel version with the uname-r command

$uname-r

2. Log in to Centos with root permission. Make sure the yum package is up to date.

$sudo yum update

3. Uninstall the old version (if the old version is installed)

$sudo yum remove docker docker-common docker-selinux docker-engine

4. Install the required software packages. Yum-util provides yum-config-manager functions, and the other two are dependent on devicemapper drivers.

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

5. Set the yum source

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

6. You can view all docker versions in all repositories and select a specific version to install

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

7. Install docker

$sudo yum install docker-ce # since only stable repository is enabled by default in repo, the latest stable version 17.12.0$ sudo yum install # is installed here, for example: sudo yum install docker-ce-17.12.0.ce

8. Start and join the boot boot

$sudo systemctl start docker$ sudo systemctl enable docker

9. Verify whether the installation is successful (both client and service indicate that the docker installation starts successfully)

$docker version II: instructions for use

Docker ps lists all the running container information.

Docker pull

Docker run: create a new container and run a command

Docker run [OPTIONS] IMAGE [COMMAND] [ARG...]

Docker pull: pull or update the specified image from the image repository

Docker pull [OPTIONS] NAME [: TAG | @ DIGEST] these are all the contents of the article "how to install docker on Centos7". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

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

Internet Technology

Wechat

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

12
Report