概述
Docker Engine
-
a daemon process (the
dockerdcommand) -
A REST API
-
A command line interface (CLI) client (the
dockercommand).
The daemon creates and manages Docker objects, such as images, containers, networks, and volumes.
What can I use Docker for?
-
Fast, consistent delivery of your applications
-
Responsive deployment and scaling
-
Running more workloads on the same hardware
Docker Architecture
Docker objects
-
image
-
container
-
network
-
volume
-
plugin
-
other objects
Example
docker run -i -t ubuntu /bin/bash
-
Docker pulls the
ubuntuimage from your configured registry,docker pull ubuntu; -
Docker creates a new container,
docker container create; -
Docker allocates a read-write filesystem to the container, as its final layer.
-
Docker creates a network interface to connect the container to the default network
-
Docker starts the container and executes
/bin/bash. -
type
exitto terminate the/bin/bashcommand, the container stops but is not removed.
The underlying technology
Namespaces
Docker uses a technology called namespaces to provide the isolated workspace called the container.
-
The
pidnamespace: Process isolation (PID: Process ID). -
The
netnamespace: Managing network interfaces (NET: Networking). -
The
ipcnamespace: Managing access to IPC resources (IPC: InterProcess Communication). -
The
mntnamespace: Managing filesystem mount points (MNT: Mount). -
The
utsnamespace: Isolating kernel and version identifiers. (UTS: Unix Timesharing System).

