Home>Article>Operation and Maintenance> 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
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 <<-'EOF' [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 the installation is successful, use the docker version command to check whether the installation is successful. After the installation is successful------as shown below
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
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!