mirror of https://github.com/docker/docs.git
resize images (#18588)
This commit is contained in:
parent
ddb2ed1d0b
commit
c7df570f30
|
|
@ -32,7 +32,7 @@ the lifetime of the node in the current swarm.
|
|||
The diagram below illustrates how manager nodes and worker nodes encrypt
|
||||
communications using a minimum of TLS 1.2.
|
||||
|
||||

|
||||

|
||||
|
||||
The example below shows the information from a certificate from a worker node:
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ For example, imagine you want to load balance between three instances of an HTTP
|
|||
listener. The diagram below shows an HTTP listener service with three replicas.
|
||||
Each of the three instances of the listener is a task in the swarm.
|
||||
|
||||

|
||||

|
||||
|
||||
A container is an isolated process. In the swarm mode model, each task invokes
|
||||
exactly one container. A task is analogous to a “slot” where the scheduler
|
||||
|
|
@ -66,7 +66,7 @@ current version of Docker only supports container tasks.
|
|||
The diagram below shows how swarm mode accepts service create requests and
|
||||
schedules tasks to worker nodes.
|
||||
|
||||

|
||||

|
||||
|
||||
### Pending services
|
||||
|
||||
|
|
@ -115,7 +115,7 @@ or other types of containers that you want to run on every node in the swarm.
|
|||
The diagram below shows a three-service replica in gray and a global service
|
||||
in black.
|
||||
|
||||

|
||||

|
||||
|
||||
## Learn more
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 38 KiB |
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 108 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 82 KiB |
|
|
@ -98,7 +98,7 @@ To help understand how this mode interacts with other hosts, the following
|
|||
figure shows the same layer 2 segment between two Docker hosts that applies to
|
||||
and IPvlan L2 mode.
|
||||
|
||||

|
||||

|
||||
|
||||
The following will create the exact same network as the network `db_net` created
|
||||
earlier, with the driver defaults for `--gateway=192.168.1.1` and `-o ipvlan_mode=l2`.
|
||||
|
|
@ -175,7 +175,7 @@ practice of layered defense in depth architectures. VLANs or the equivocal VNI
|
|||
(Virtual Network Identifier) when using the Overlay driver, are the first step
|
||||
in isolating tenant traffic.
|
||||
|
||||

|
||||

|
||||
|
||||
The Linux sub-interface tagged with a VLAN can either already exist or will be
|
||||
created when you call a `docker network create`. `docker network rm` will delete
|
||||
|
|
@ -307,7 +307,7 @@ upstream network will not know about without route distribution. For those
|
|||
curious how IPvlan L3 will fit into container networking, see the following
|
||||
examples.
|
||||
|
||||

|
||||

|
||||
|
||||
IPvlan L3 mode drops all broadcast and multicast traffic. This reason alone
|
||||
makes IPvlan L3 mode a prime candidate for those looking for massive scale and
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ in the container's filesystem.
|
|||
An easy way to visualize the difference among volumes, bind mounts, and `tmpfs`
|
||||
mounts is to think about where the data lives on the Docker host.
|
||||
|
||||

|
||||

|
||||
|
||||
- Volumes are stored in a part of the host filesystem which is _managed by
|
||||
Docker_ (`/var/lib/docker/volumes/` on Linux). Non-Docker processes should not
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ available. If you are developing new Docker applications, consider using
|
|||
[named volumes](volumes.md) instead. You can't use Docker CLI commands to directly
|
||||
manage bind mounts.
|
||||
|
||||

|
||||

|
||||
|
||||
## Choose the -v or --mount flag
|
||||
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ writing new files, modifying existing files, and deleting files, are written to
|
|||
this thin writable container layer. The diagram below shows a container based
|
||||
on an `ubuntu:15.04` image.
|
||||
|
||||

|
||||

|
||||
|
||||
A _storage driver_ handles the details about the way these layers interact with
|
||||
each other. Different storage drivers are available, which have advantages
|
||||
|
|
@ -91,7 +91,7 @@ stored in this container layer, multiple containers can share access to the same
|
|||
underlying image and yet have their own data state. The diagram below shows
|
||||
multiple containers sharing the same Ubuntu 15.04 image.
|
||||
|
||||

|
||||

|
||||
|
||||
Docker uses storage drivers to manage the contents of the image layers and the
|
||||
writable container layer. Each storage driver handles the implementation
|
||||
|
|
|
|||
|
|
@ -167,14 +167,14 @@ nested and snapshotted. The diagram below shows 4 subvolumes. 'Subvolume 2' and
|
|||
'Subvolume 3' are nested, whereas 'Subvolume 4' shows its own internal directory
|
||||
tree.
|
||||
|
||||

|
||||

|
||||
|
||||
Only the base layer of an image is stored as a true subvolume. All the other
|
||||
layers are stored as snapshots, which only contain the differences introduced
|
||||
in that layer. You can create snapshots of snapshots as shown in the diagram
|
||||
below.
|
||||
|
||||

|
||||

|
||||
|
||||
On disk, snapshots look and feel just like subvolumes, but in reality they are
|
||||
much smaller and more space-efficient. Copy-on-write is used to maximize storage
|
||||
|
|
@ -182,7 +182,7 @@ efficiency and minimize layer size, and writes in the container's writable layer
|
|||
are managed at the block level. The following image shows a subvolume and its
|
||||
snapshot sharing data.
|
||||
|
||||

|
||||

|
||||
|
||||
For maximum efficiency, when a container needs more space, it is allocated in
|
||||
*chunks* of roughly 1 GB in size.
|
||||
|
|
@ -192,7 +192,7 @@ own Btrfs subvolume or snapshot. The base layer of an image is stored as a
|
|||
subvolume whereas child image layers and containers are stored as snapshots.
|
||||
This is shown in the diagram below.
|
||||
|
||||

|
||||

|
||||
|
||||
The high level process for creating images and containers on Docker hosts
|
||||
running the `btrfs` driver is as follows:
|
||||
|
|
|
|||
|
|
@ -741,7 +741,7 @@ container, it is a snapshot of the image the container is based on. The followin
|
|||
example shows a Docker host with two running containers. The first is a `ubuntu`
|
||||
container and the second is a `busybox` container.
|
||||
|
||||

|
||||

|
||||
|
||||
## How container reads and writes work with `devicemapper`
|
||||
|
||||
|
|
@ -751,7 +751,7 @@ With `devicemapper`, reads happen at the block level. The diagram below shows
|
|||
the high level process for reading a single block (`0x44f`) in an example
|
||||
container.
|
||||
|
||||

|
||||

|
||||
|
||||
An application makes a read request for block `0x44f` in the container. Because
|
||||
the container is a thin snapshot of an image, it doesn't have the block, but it
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ ZFS uses the following objects:
|
|||
|
||||
The process of creating a clone:
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
1. A read-only snapshot is created from the filesystem.
|
||||
|
|
@ -175,7 +175,7 @@ on a ZFS Snapshot of the top layer of the image it's created from.
|
|||
The diagram below shows how this is put together with a running container based
|
||||
on a two-layer image.
|
||||
|
||||

|
||||

|
||||
|
||||
When you start a container, the following steps happen in order:
|
||||
|
||||
|
|
@ -209,7 +209,7 @@ the dataset it was created from (the snapshots of its parent layers). Read
|
|||
operations are fast, even if the data being read is from a deep layer.
|
||||
This diagram illustrates how block sharing works:
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
### Writing files
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ As opposed to volumes and bind mounts, a `tmpfs` mount is temporary, and only
|
|||
persisted in the host memory. When the container stops, the `tmpfs` mount is
|
||||
removed, and files written there won't be persisted.
|
||||
|
||||

|
||||

|
||||
|
||||
This is useful to temporarily store sensitive files that you don't want to
|
||||
persist in either the host or the container writable layer.
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ container's writable layer, because a volume doesn't increase the size of the
|
|||
containers using it, and the volume's contents exist outside the lifecycle of a
|
||||
given container.
|
||||
|
||||

|
||||

|
||||
|
||||
If your container generates non-persistent state data, consider using a
|
||||
[tmpfs mount](tmpfs.md) to avoid storing the data anywhere permanently, and to
|
||||
|
|
|
|||
Loading…
Reference in New Issue