Linux install Docker and run Ubuntu system

Linux install Docker and run Ubuntu system###

Docker is a kind of container, what is a container? In software development, we often encounter "This program is obviously no problem on my computer, why is there a problem on the customer's computer?" This is because the software and hardware of each computer are inconsistent.

Is there a unified, virtual software and hardware platform on which the software is developed and sent to customers, who can run programs directly on this platform? Yes, this is the container. There are many kinds of containers, and Docker is the better one.
Compared with VMware, Docker is a lightweight software that runs fast.

Before using Docker, you need to understand two concepts: Image and container, that is, image and container. The image is an environment package, which can be moved to any Docker platform to run. The container is an instance of an image, and one image can start multiple containers.
In simple analogy, the image is like a Word software, which is released by the manufacturer and you cannot modify it; the container is that you start the Word software, you can start multiple Word software, and write different documents in each Word software.

The core of Docker is the "union file system". What does it mean?
Suppose you have 2 directories: lower and upper, they can be merged into a new directory merged, the content is as follows:

What is the principle of merger? The upper directory has higher priority and can overwrite the lower directory. The lower directory is read-only, and the upper directory is readable and writable. This rule can be parsed more specifically:

① If the file name and directory are different, the files and directories in the lower and upper directories are merged into the merged directory according to the original structure;

② The file names are the same, only the files in the upper layer are displayed:
As shown in the above figure, there are same.txt files in the lower and upper directories and the lower directory dir_A, but when merged into the merged directory, only upper is displayed, while lower is hidden.

③ If the directory names are the same, merge the directories into one directory:
As shown in the above figure, there are dir_A directories in the lower and upper directories. All files in the directories and directories are merged into the merged dir_A directory. If there are files in the directory with the same name, only upper ones will also be displayed, as shown in the above figure. same.txt file.

When reading a file, if there is the file in the upper directory, read it from the upper directory; otherwise, read it in the lower directory.
When creating, modifying, or deleting files, only the upper directory is affected, and the lower directory is read-only and is not affected.
In Docker, the image provides read-only files in the lower layer; the container provides readable and writable files in the upper layer, as follows:

When we start a container, we create a readable and writable upper file system based on the lower file system provided by the image.
We can start multiple containers, that is, create multiple upper layer file systems, and the upper layer file systems of these containers do not affect each other.

Recommended Posts

Linux install Docker and run Ubuntu system
Install and configure Docker in Ubuntu
ubuntu18.04 install docker
docker install ubuntu
Talk about | Install and use Linux system Ubuntu under Win10
How to install JDK and Mysql on Ubuntu 18.04 linux system
Linux development preparation-install VMware and run Ubuntu
Install linux (ubuntu) dual system under windows system
Install docker on ubuntu and basic usage
Install docker on Ubuntu
Install Docker on ubuntu18.04
Install Docker on Ubuntu18
Install and use Git and GitHub on Ubuntu Linux
How to install and use Docker on Ubuntu 20.04
Win10 install Linux ubuntu-18.04 dual system (installation guide)
How to install and use Docker on Ubuntu 16.04
Windows 10 install Linux subsystem Ubuntu
[Linux] ubuntu install configuration vsftpd and lock the directory
Know Linux and install CentOS
2.5 Linux (Ubuntu18.04) install database PostgreSQL
ubuntu18.04 compile and install python3.8
Ubuntu and RHEL dual Linux operating system installation tutorial
[Linux] Ubuntu install pip and its various bug solutions
The difference between CentOS and Ubuntu in Linux system
How to install theano and keras on ubuntu system
Ubuntu16.04 install SVN and configuration
Ubuntu16.04 install and uninstall VMware-Workstation 14
Install Docker on Ubuntu 18.04 offline
Install and configure MySQL on Ubuntu
Docker ubuntu: install python-PIL-image environment on 14.04
Install and deploy Gerrit under Ubuntu
Install nodejs and npm under Ubuntu 16.04
Install and use docker under CentOS 6.8
Install Centos7 operating system in Docker
Ubuntu upgrade software and ubuntu upgrade system commands
Install Hadoop system environment on Ubuntu 18.04
Linux CentOS6 compile and install Pyt
Compile and install QEMU under Ubuntu
Ubuntu uses Docker to install Gitlab
Linux basics (Ubuntu copy and paste)
Linux (ubuntu 12.04)
ubuntu Docker installation and deployment of Rancher
How to install Docker Compose on Ubuntu 18.04
Ubuntu18.04 system installation and prerequisite software installation guide
Linux kernel compilation and CentOS system installation
[Daily] Win10 open and install ubuntu subsystem
Ubuntu install Elasticsearch and elasticsearch-analysis-ik word segmentation
Install mysql8.0.13 version under Linux CentOS7 system
How to install MySQL on Ubuntu 18.04 (linux)
Ubuntu19.10 compile and run C language program
Install fonts on Ubuntu and switch default fonts
Ubuntu 18.04 source code compile and install ffmpeg4.1
Windows 10 subsystem linux install pagoda panel Ubuntu
Install and uninstall CUDA and CUDNN on Ubuntu
Install utility software collection under Ubuntu system
Ubuntu install ftp server and possible problems
How to install Ubuntu20.04 and install NVIDIA driver
How to install Prometheus with Docker on Ubuntu 14.04
How to install vim editor under Linux (Ubuntu 18.04)
Windows10 install ubuntu20.04 dual system detailed graphic tutorial
How to install Pycharm and Ipython on Ubuntu 16.04/18.04