Home  >  Article  >  Operation and Maintenance  >  How to deploy docker on linux

How to deploy docker on linux

藏色散人
藏色散人Original
2020-05-18 11:31:562148browse

How to deploy docker on linux

#How to deploy docker on linux?

Docker’s three core concepts: image, container, warehouse

Image: a mirror similar to a virtual machine, which is an installation file in common parlance.

Container: Similar to a lightweight sandbox, the container creates an application running instance from the image.

It can be started, started, stopped, and deleted, and these containers are isolated from each other. , mutually invisible.

Warehouse: Similar to a code warehouse, it is a place where Docker stores image files centrally.

A brief introduction to installing Docker on CentOS.

Preconditions:

64-bit 系统
kernel 3.10+

1. Check the kernel version, and the returned value is greater than 3.10.

  $ uname -r

How to deploy docker on linux

2. Log in to the terminal using a user with sudo or root privileges.

3. Make sure yum is the latest

  $ yum update

4.Add yum repository

tee /etc/yum.repos.d/docker.repo <<-&#39;EOF&#39;
[dockerrepo]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/$releasever/
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg
EOF

How to deploy docker on linux

5.Install Docker

  $ yum install -y docker-engine

After the installation is successful, use the docker version command to check whether the installation is successful. After the installation is successful------as shown below

How to deploy docker on linux

6. Start docker

  $systemctl start docker.service

7. Verify whether the installation is successful (there are two parts, client and service, indicating that the docker installation and startup are successful)

Use the docker version command to check

How to deploy docker on linux

8 .Set up auto-start at boot

 $ sudo systemctl enable docker

Recommended: "docker tutorial"

The above is the detailed content of How to deploy docker on linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn