Home  >  Article  >  Operation and Maintenance  >  Docker installation detailed steps

Docker installation detailed steps

王林
王林forward
2020-10-22 18:50:193546browse

Docker installation detailed steps

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

Image: an image 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.

(Recommended tutorial: docker tutorial)

A brief introduction to installing Docker on CentOS.

Prerequisites:

64-bit system

kernel 3.10

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

  $ uname -r

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

5. Install Docker

  $ yum install -y docker-engine

After successful installation, Use the docker version command to check whether the installation is successful

6. Start docker

  $systemctl start docker.service

7. Verify whether the installation is successful (the client and service parts indicate that the docker installation and startup are successful)

Use the docker version command to view

8. Set up auto-start on boot

 $ sudo systemctl enable docker

Installation completed!

The above is the detailed content of Docker installation detailed steps. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete