Docker Getting Started overview
- Docker Getting Started overview
- Write in front
- Overview
- What is Docker
- What is Docker Engine
- The usefulness of Docker
- Installation
- Demonstrate
- Architecture and principles
- Conclusion
- Resources
This article provides a general introduction to Docker, including overview, installation, simple use, architecture, fundamentals, etc.
Write in front
- This article is my own study Docker's a record and collation, gnawing English documents very laborious, lazy to translate, so write this article like "index", I hope to help the same as my novice quick start
- This article mainly refers to the official documentation (Docker document) and related technical blogs
- If there is a wrong understanding of the place also hope to correct
Overview of what is Docker?
You can refer to the following three articles. Judging from the way I use it, I think Docker is an application packaging tool that uses Docker to distribute the written application, and then others can deploy it directly, especially handy.
- What is Docker?
- Understanding Docker
- What is Docker? President
What is Docker Engine?
Docker Engine is a client-server application with these major components:
- A server which is a type of long-running program called a daemon process.
- A REST API which specifies interfaces that programs can use to talk to the daemon and instruct it.
- A Command Line Interface (CLI) client.
I think the explanation of the official website is very concise, attached (excerpt from the official website)
The usefulness of Docker
- Faster Delivery of your applications
- Deploying and scaling more easily
- Achieving higher density and running more workloads
Installation
Install the reference install Docker Engine
Ubuntu
Take Ubuntu 14.04 as an example, refer to installation on Ubuntu install Docker engine
Important steps are listed here:
- Update apt sources, including adding certificates, keys, etc.
- Installing with sudo apt-get
- Further configuration, primarily to create a Docker user group
Note: If the input problem docker info
, most of the permissions issue, with Sudo run try
Mac OS X
Mac under installation reference installation on Mac OS X
There are two types of installation options available under Mac
- The native application of Docker for Mac:mac, instead of using a virtual machine (VirtualBox), uses the Hyperkit
- Docker Toolbox: Install virtual machines and use Docker-machine to run Boot2docker and Docker Engine
For the difference between the two, refer to Docker for Mac vs. Docker Toolbox
Demonstrate
Not much to say, run up the experience. Specific steps and instructions in the Docker concise tutorial This article has been written very clearly, here no longer repeat
Architecture and principles
By the know, Docker is a client-server architecture
- The Docker daemon: running on the host
- The Docker client: interface for user and Dokcer daemon interaction
There are three main types of resources/components inside Docker
- Docker images: build component, readable only
- Docker registries: distribution Component,images shared library
- Docker containers: Run component
Here's the point about images and containers.
Docker uses union file systems to combine different layers (layer) into a single image. One of the aufs in the Union File system is a reference to this blog post
The official website documents describe the layers of image.
Each Docker image references a list of read-only layers that represent filesystem differences. Layers is stacked on top of each of the other to form a base for a container ' s root filesystem
Changes to the storage model of the new Docker (version>=1.10)
Previously, image and layer data was referenced and stored using a randomly generated UUID. The new model is replaced by a secure content hash.
The main difference between container and image is in the top writablelayer, where all changes to the image are saved. In other words, multiple container can share the same image, which greatly saves space. There are two key technologies for managing image and container: Stackable image layers and copy-on-write (CoW).
As you can see, Copy-on-write (CoW) is a good strategy that saves space and avoids write-conflict problems caused by data sharing, thus improving efficiency.
Conclusion
This article mainly on Docker to do a brief introduction, for some more detailed knowledge, such as Docker File,volume,network,docker compose and so on, will write another article to introduce. For very specific instructions, such as how to install, how to build image and run container to run a simple Docker Hello World, please refer to the Official Document Docker engine section of the "Get Started with Docker" "or" learn by example "can also refer to some references at the end of the article
Resources
- Docker documentation (Official document)
- Docker Getting Started Tutorial (series)
- Docker Brief tutorial (using demo)
- Docker Chinese (series)
- Docker Resources
- Docker-from Getting started to practicing (Gitbook)
Author @brianway More articles: personal website |
CSDN |
Oschina
Docker Getting Started overview