CentOS 7.3 installation tutorial for Docker

  • 2020-06-12 11:12:15
  • OfStack

1. Introduction

Docker is an open source application container engine based on the Go language and open source under the Apache2.0 protocol.

Docker allows developers to package their applications and dependencies into a lightweight, portable container for distribution on any popular Linux machine, or virtualize.

Containers are completely sandboxed, have no interfaces to each other (like iPhone's app), and, more importantly, have very low performance overhead.

This tutorial is suitable for readers: operation and maintenance engineers, back-end developers, through this tutorial, you can understand the use of Docker step by step.

2. Application scenarios of Docker

1. Automatic packaging and release of Web applications.

2. Automated testing and continuous integration and release.

3. Deploy and adjust the database or other background applications in the service environment.

4. Compile or extend existing OpenShift or CloudFoundry platforms from scratch to build their own PaaS environment.

3. Advantages of Docker

1. Simplified procedures:

Docker allows developers to package their applications and dependencies into a portable container and release them to any popular Linux machine for virtualization. Docker has changed the way virtualization works, allowing developers to manage their work directly within Docker. The Docker's biggest advantage is that tasks that used to take days or weeks can be completed in seconds with the Docker container.

2. Avoid selection phobias:

If you have a phobia of choice, or experienced. Docker helps you pack your kinks! Docker mirror images; The Docker image includes the running environment and configuration, so Docker makes it easy to deploy multiple application instances. For example, Web application, background application, database application, big data application such as Hadoop cluster, message queue, etc., can be packaged into a mirror deployment.
3. Save money:

1. With the advent of cloud computing era, developers do not have to configure expensive hardware in pursuit of effect. Docker has changed the mindset of high performance and high price. The combination of Docker and cloud makes cloud space more fully utilized. It not only solves the problem of hardware management, but also changes the way virtualization is done.

4. Architecture of Docker

Docker USES the client-server (C/S) schema pattern and USES remote API to manage and create Docker containers.

The Docker container is created using the Docker image.

The relationship between containers and mirrors is similar to that of objects and classes in object-oriented programming.

5. Install Docker

1, environmental

CentOS7. 3 mirror:

http://mirrors.cn99.com/centos/7/isos/x86_64/CentOS-7-x86_64-DVD-1611.iso

2. Close selinux


setenforce 0
sed -i '/^SELINUX=/c\SELINUX=disabled' /etc/selinux/config

3, installation,


yum -y install docker

4. Check whether the installation is successful


docker version

If the version number of Docker is printed, the installation is successful

5. Start Docker service


/bin/systemctl start docker.service

1 Once the Docker service is started, you can start using Docker


Related articles: