Docker installation detailed steps

王林
Release: 2020-10-22 18:50:19
forward
3586 people have browsed it

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
Copy after login

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

3. Make sure yum is the latest

  $ yum update
Copy after login

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
Copy after login

5. Install Docker

  $ yum install -y docker-engine
Copy after login

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

6. Start docker

  $systemctl start docker.service
Copy after login

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
Copy after login

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!

Related labels:
source:csdn.net
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template