Original link: http://www.dubby.cn/detail.html?id=8733 preliminary Knowledge
While we're going to introduce a lot of concepts, it's best to know in advance what Docker is, and why you're using Docker.
We assume that you are familiar with the following knowledge: IP address and Port virtual machine Edit Profile code dependencies and code building basic understanding of the use of computer resources, such as: CPU usage, RAM usage, etc. a brief explanation of the container
mirroring is a lightweight, stand-alone, executable package that contains everything the software needs to run, including: Code, runtime, various libraries, environment variables, configuration files, etc.
A container is a running instance of a mirror-that is, the mirror is loaded into memory and is actually executed. By default, the container and host are completely isolated, and at most, only the Hosts file and port of the host are used when configured.
The container will run the application directly in the host's kernel, which will have better performance than the virtual machine, because the virtual machine can only use the virtual permissions of the host resource indirectly through Hypervisor (Super Supervisor). Containers can have native resource usage rights, each running in a separate process without the need for additional memory. Virtual machine schematic
Note the operating system of the client running on the virtual machine at each OS layer. This is a resource set, the result is disk mirroring, the application state is coupled with the host, including host settings, system installation dependencies, system security patches, and other easily overlooked small details. container schematic
Containers share a kernel, and to make a container image, you only need to have the program's execution files and related dependencies, which do not need to be installed on the host. You can use Docker PS to manage these processes, much like the native process with the PS operating system. Finally, it is important to note that the container already contains all the dependencies that the program is running, and no more configuration is required, so a containerized application can "runs Anywhere" (run anywhere). Set
Before you set it up, make sure you've installation the latest version of Docker. Installation
Note: This document requires a version of no less than 1.13.
If you are finished installing, you can try running Docker run Hello-world:
➜~ Docker Run Hello-world unable to find image ' hello-world:latest ' locally latest:pulling from Library/hello-world B0 4784fba78d:pull Complete Digest:sha256:f3b3b28a45160805bb16542c9531888519430e9e6d6ffc09d72261b0d26ff74f Status:
Downloaded newer image for hello-world:latest Hello from docker!
This message shows the your installation appears to be working correctly.
To generate this message, Docker took the following steps:1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "Hello-world" image from the Docker Hub. 3. The Docker daemon created a new container from this image which runs the executable that produces the output of you AR
e currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it to your terminal. To try something + ambitious, you can run a Ubuntu container with: $ docker run-it Ubuntu bash Share images, automa Te workflows, and more with a free Docker id:https://cloud.docker.cOm/for more examples and ideas, visit:https://docs.docker.com/engine/userguide/
To see if the version meets the requirements, use Docker--version:
➜ ~ Docker--version
Docker version 17.05.0-ce-rc1, build 2878a85
If you run the results similar to mine, then you can happily use Docker to play.