Introduction to Docker containers

Introduction to Docker containers

Docker Overview

Docker is an open source software deployment solution;
Docker is also a lightweight application container framework;
Docker can package, publish, and run any application. This is also the product concept of Docker: Docker - Build, Ship, and Run Any App, Anywhere
Docker uses LXC (Namespace+CGroups), which implements lightweight design through image management mechanism based on the Namespace [resource isolation] and CGroups [resource control] technologies of the Linux kernel.

Docker composition

Docker consists of Docker server and Docker client. Docker includes the following components: container, image and repository, as shown in the following figure:

Docker vs VM

As a type of container, Docker is very different from traditional VMs. First, let's compare the two in terms of architecture:

By comparison, we can see that VM is actually an operating system virtualized (hypervisor) based on hardware, and multiple VMs share the underlying hardware resources. Docker uses Namespace and CGroups technology for isolation based on Linux, which allows Docker to run on both hardware operating systems and VMs. The difference between the two also determines the difference between the two. Here we summarize the differences between the two, as follows:

Since Docker has such a feature, what can Docker do? The figure below shows 8 scenarios of docker. Based on actual work, the author mainly uses docker to simplify the release process of existing products, reducing a lot of environment configuration work. Due to the isolation of docker, the application can be packaged into a docker image, and different versions of the same product can be packaged into different images, which also facilitates testing.

Therefore, looking at Docker from different positions, the changes brought by Docker are all-round.


You may also be interested in:
  • Docker installation and simple usage tutorial
  • Docker simple installation and application introductory tutorial
  • What is Docker? Docker Getting Started Tutorial Part 1
  • Docker Learning Notes: Getting Started with Docker
  • Docker Getting Started Quick Start Guide
  • Docker Getting Started Installation Tutorial (Beginner Edition)
  • Two-hour introductory Docker tutorial
  • Docker container from entry to obsession (recommended)

<<:  Execution context and execution stack example explanation in JavaScript

>>:  MySQL 5.7.17 latest installation tutorial with pictures and text

Recommend

MySQL data compression performance comparison details

Table of contents 1. Test environment 1.1 Hardwar...

Docker installs ClickHouse and initializes data testing

Clickhouse Introduction ClickHouse is a column-or...

How to modify the master-slave replication options in MySQL online

Preface: The most commonly used architecture of M...

Example of implementing QR code scanning effects with CSS3

Online Preview https://jsrun.pro/AafKp/ First loo...

Linux concurrent execution is simple, just do it this way

Concurrency Functions time for i in `grep server ...

XHTML introductory tutorial: Web page Head and DTD

Although head and DTD will not be displayed on th...

Detailed explanation of the use of title tags and paragraph tags in XHTML

XHTML Headings Overview When we write Word docume...

Use of provide and inject in Vue3

1. Explanation of provide and inject Provide and ...

How to solve the 2002 error when installing MySQL database on Alibaba Cloud

The following error occurred while installing the...

How to print highlighted code in nodejs console

Preface When the code runs and an error occurs, w...

Example of how to install nginx to a specified directory

Due to company requirements, two nginx servers in...

JavaScript to achieve digital clock effect

This article example shares the specific code of ...