Install Docker on Linux (very simple installation method)

Install Docker on Linux (very simple installation method)

I have been quite free recently. I have been doing internship for a few months as a senior in college. As an intern, I was asked to study Docker. Shame!

The three core concepts of Docker: images, containers, and warehouses

Image: Similar to the image of a virtual machine, in layman's terms, it is an installation file.

Container: Similar to a lightweight sandbox, a container is an application running instance created from an image. It can be started, started, stopped, and deleted, and these containers are isolated and invisible to each other.

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

Let’s briefly introduce how to install Docker on CentOS.

Prerequisites:

  • 64-bit systems
  • kernel 3.10+

1. Check the kernel version. The returned value should be greater than 3.10.

$ uname -r 

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

3. Make sure yum is up to date

$ 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 successful installation, use the docker version command to check whether the installation is successful. After successful installation------as shown below

6. Start Docker

$ systemctl start docker.service

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

Use the docker version command to view

8. Set the startup to start automatically

$ sudo systemctl enable docker

So far, Docker is fully installed.

If there are any shortcomings, fellow Taoists are welcome to point them out.

Summarize

The above is the full content of this article. I hope that the content of this article will have certain reference learning value for your study or work. Thank you for your support of 123WORDPRESS.COM. If you want to learn more about this, please check out the following links

You may also be interested in:
  • How to deploy redis in linux environment and install it in docker
  • The process of installing Docker offline on Linux (one-click installation)
  • How to install docker on Linux system and log in to docker container through ssh
  • Detailed explanation of how to install Docker CE from a package under Linux
  • How to install and use Docker on Linux
  • Docker installation and usage tutorial under Linux
  • Installation tutorial of docker in linux

<<:  JavaScript design pattern learning adapter pattern

>>:  Detailed explanation of the use of the MySQL parameter sql_safe_updates in the production environment

Recommend

Vue uses three methods to refresh the page

When we are writing projects, we often encounter ...

Build nginx virtual host based on domain name, port and IP

There are three types of virtual hosts supported ...

Front-end state management (Part 1)

Table of contents 1. What is front-end state mana...

MySQL SHOW PROCESSLIST assists in the entire process of troubleshooting

1. SHOW PROCESSLIST command SHOW PROCESSLIST show...

HTML set as homepage and add to favorites_Powernode Java Academy

How to implement the "Set as homepage" ...

HTML basic structure_Powernode Java Academy

Many times when learning web page development, th...

Vue implements two routing permission control methods

Table of contents Method 1: Routing meta informat...

How to use docker to deploy dubbo project

1. First, use springboot to build a simple dubbo ...

Teach you how to deploy Vue project with Docker

1.Write in front: As a lightweight virtualization...

Example of implementing GitHub's third-party authorization method in Vue

Table of contents Creating OAuth Apps Get the cod...

Native JavaScript implementation of progress bar

The specific code for JavaScript to implement the...

MySQL should never write update statements like this

Table of contents Preface cause Phenomenon why? A...

Detailed analysis of the syntax of Mysql update to modify multiple fields and

When updating a record in MySQL, the syntax is co...