Docker tutorial

Read(33433) update time(2022-04-11)

"Docker Tutorial" Docker is an open source application container engine, based on the Go language and open source in compliance with the Apache2.0 protocol. Docker allows developers to package their applications and dependencies into a lightweight, portable container and then publish it to any popular Linux machine, which can also be virtualized. Containers completely use the sandbox mechanism and do not have any interfaces with each other (similar to iPhone apps). More importantly, the container performance overhead is extremely low.


Docker is an open source software project that automates the deployment of applications in software containers, thereby providing an additional software abstraction layer and automatic operating system layer virtualization on the Linux operating system. management mechanism.

Docker uses the resource separation mechanism in the Linux core, such as cgroups, and Linux core namespaces (namespaces), to create independent containers (containers). This works under a single Linux entity, avoiding the additional burden of booting a virtual machine.

The Linux core's support for namespaces completely isolates the application's view of the working environment, including the process tree, network, user ID and mounted file system, while the core cgroup provides resource isolation, including CPU, memory , block I/O and network.

Starting from version 0.9, Dockers began to include the libcontainer library as a direct use of virtualization provided by the Linux kernel on the basis of using abstract virtual interfaces provided by libvirt's LXC and systemd-nspawn. facilities.

Tips: Before you start learning to use Docker, you need to master Linux common commands.

According to industry analyst firm 451 Research: “Dockers are dependency tools that have the ability to package applications and their virtual containers that can run on any Linux server, which helps achieve flexibility. And portability, applications can run anywhere, whether it is public cloud, private cloud, stand-alone, etc."

A complete Docker consists of the following parts:

  • DockerClient

  • Docker Daemon

  • Docker Image

  • DockerContainer container

Docker advantages

  • Simplify the process:

Docker allows developers to package them By putting the application and dependency packages into a portable container and then publishing it to any popular Linux machine, virtualization can be achieved. Docker has changed the way of virtualization, allowing developers to directly put their results into Docker for management. Convenience and speed are already the biggest advantages of Docker. Tasks that used to take days or even weeks can be completed in just a few seconds under the processing of Docker containers.

  • Avoid choice phobia:

If you have choice phobia, be an experienced patient. Then you can use Docker to package your tangle! For example, Docker images; Docker images contain the operating environment and configuration, so Docker can simplify the deployment of multiple application instances. For example, web applications, background applications, database applications, big data applications such as Hadoop clusters, message queues, etc. can be packaged into a mirror for deployment.

  • Cutting costs:

On the one hand, the advent of the cloud computing era frees developers from the need to configure expensive hardware in order to pursue results. Docker has changed the mindset that high performance must be high price. The combination of Docker and the cloud allows cloud space to be more fully utilized. It not only solves the problem of hardware management, but also changes the way of virtualization.

Tip: Our Docker tutorial will help you learn to use Docker. If you have any questions, please go to the PHP Chinese website Docker Community to ask your question, and enthusiastic netizens will answer it for you.

Content covered by this Docker tutorial manual

This Docker tutorial covers all basic and advanced knowledge of Docker, including the use of Docker, Docker installation of Nginx, Docker installation of PHP, Docker installation of MySQL, Detailed explanation of Docker installation of Python, Docker installation of redis, etc.

Tips: Each chapter of this tutorial contains many detailed examples with pictures and texts. These examples will help you better understand and use Docker.

Latest chapter


Docker 资源汇总 2016-10-18
Docker 命令大全 2016-10-18
Docker 安装 Apache 2016-10-18
Docker 安装 MongoDB 2016-10-18
Docker 安装 Redis 2016-10-18
Docker 安装 Python 2016-10-18
Docker 安装 Tomcat 2016-10-18
Docker 安装 MySQL 2016-10-18