What is ## Docker


Docker is an open source application container engine that allows developers to package their applications and dependencies into a portable image that can then be distributed to any popular Linux or Windows machine, as well as virtualization. Containers are completely sandboxed and have no interface with each other. (Baidu Encyclopedia)



Docker is an open source project that began life in early 2013 as a side project within dotCloud. It is based on Google’s Go language implementation.

The goal of the Docker project is to achieve a lightweight operating system virtualization solution.

What problem does ## Docker solve

Develop, deploy, and run any application anywhere

Comparison (Docker is equivalent to traditional virtualization technology and does not require additional systems as the environment for running applications)

– Lightweight container – fast

– Run across environments and systems

– Easy to build (deploy)

– Simple management

## Docker core concept



– Image

Similar to a virtual machine image (read/write, stateless)

– Container

It’s like a small system, starting from an image

– Repository

One mirror in one warehouse!

# # Docker installation

Installation link: [https://docker_practice.gitee.io/zh-cn/install/](https://docker_practice.gitee.io/zh-cn/install/)

– Windows: Download and install exe (hyper-V support required)

– Ubuntu: Uninstall the old version (not necessary):

“`bash

$ sudo apt-get remove docker \ docker-engine \ docker.io“`

Installation:

“`bash

$ sudo apt-get update$ sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ software-properties-common

` ` `

Domestic sources are strongly recommended: To verify the validity of the downloaded software package, add the GPG key of the software source

“`bash

$ curl -fsSL https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu/gpg | sudo apt-key add –

Official source # # $curl – fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt — the key to add

` ` `

Source list add:

“`bash

$ sudo add-apt-repository \ “deb [arch=amd64] https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu \ $(lsb_release -cs) \ stable”

Official source # # $sudo add apt – repository \ # “deb \ [arch = amd64] https://download.docker.com/linux/ubuntu # $\ # (lsb_release – cs) stable”

` ` `

Update apt package cache and install docker-CE:

“`bash

$ sudo apt-get update$ sudo apt-get install docker-ce

` ` `

# # Docker operation