Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Commit 76c903b

Browse files
authored
Merge pull request #2178 from thaJeztah/19.03_backport_docs_updates
[19.03 backport] docs updates Upstream-commit: ad6c6670340a726e3f3fd280b17266ba1145aa3b Component: cli
2 parents 584423d + d10e0ad commit 76c903b

9 files changed

Lines changed: 43 additions & 24 deletions

File tree

components/cli/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
[![build status](https://circleci.com/gh/docker/cli.svg?style=shield)](https://circleci.com/gh/docker/cli/tree/master) [![Build Status](https://jenkins.dockerproject.org/job/docker/job/cli/job/master/badge/icon)](https://jenkins.dockerproject.org/job/docker/job/cli/job/master/)
1+
[![build status](https://circleci.com/gh/docker/cli.svg?style=shield)](https://circleci.com/gh/docker/cli/tree/master)
2+
[![Build Status](https://ci.docker.com/public/job/cli/job/master/badge/icon)](https://ci.docker.com/public/job/cli/job/master)
23

34
docker/cli
45
==========

components/cli/docs/reference/builder.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,12 @@ be UPPERCASE to distinguish them from arguments more easily.
157157

158158

159159
Docker runs instructions in a `Dockerfile` in order. A `Dockerfile` **must
160-
start with a \`FROM\` instruction**. The `FROM` instruction specifies the [*Base
161-
Image*](glossary.md#base-image) from which you are building. `FROM` may only be
162-
preceded by one or more `ARG` instructions, which declare arguments that are used
163-
in `FROM` lines in the `Dockerfile`.
160+
begin with a \`FROM\` instruction**. This may be after [parser
161+
directives](#parser-directives), [comments](#format), and globally scoped
162+
[ARGs](#arg). The `FROM` instruction specifies the [*Parent
163+
Image*](glossary.md#parent-image) from which you are building. `FROM`
164+
may only be preceded by one or more `ARG` instructions, which declare arguments
165+
that are used in `FROM` lines in the `Dockerfile`.
164166

165167
Docker treats lines that *begin* with `#` as a comment, unless the line is
166168
a valid [parser directive](#parser-directives). A `#` marker anywhere
@@ -1720,8 +1722,8 @@ The following `ARG` variables are set automatically:
17201722
* `TARGETVARIANT` - variant component of TARGETPLATFORM
17211723
* `BUILDPLATFORM` - platform of the node performing the build.
17221724
* `BUILDOS` - OS component of BUILDPLATFORM
1723-
* `BUILDARCH` - OS component of BUILDPLATFORM
1724-
* `BUILDVARIANT` - OS component of BUILDPLATFORM
1725+
* `BUILDARCH` - architecture component of BUILDPLATFORM
1726+
* `BUILDVARIANT` - variant component of BUILDPLATFORM
17251727

17261728
These arguments are defined in the global scope so are not automatically
17271729
available inside build stages or for your `RUN` commands. To expose one of

components/cli/docs/reference/commandline/cli.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ each `docker` command with `sudo`. To avoid having to use `sudo` with the
5454
For more information about installing Docker or `sudo` configuration, refer to
5555
the [installation](https://docs.docker.com/install/) instructions for your operating system.
5656

57-
### Environment variables
57+
## Environment variables
5858

5959
For easy reference, the following list of environment variables are supported
6060
by the `docker` command line:
@@ -99,7 +99,7 @@ By default, the Docker command line stores its configuration files in a
9999
directory called `.docker` within your `$HOME` directory.
100100

101101
Docker manages most of the files in the configuration directory
102-
and you should not modify them. However, you *can modify* the
102+
and you should not modify them. However, you *can* modify the
103103
`config.json` file to control certain aspects of how the `docker`
104104
command behaves.
105105

@@ -111,12 +111,12 @@ variable. Command line options override environment variables and environment
111111
variables override properties you specify in a `config.json` file.
112112

113113

114-
#### Change the `.docker` directory
114+
### Change the `.docker` directory
115115

116116
To specify a different directory, use the `DOCKER_CONFIG`
117117
environment variable or the `--config` command line option. If both are
118118
specified, then the `--config` option overrides the `DOCKER_CONFIG` environment
119-
variable. The example below overrides runs the `docker ps` command using a
119+
variable. The example below overrides the `docker ps` command using a
120120
`config.json` file located in the `~/testconfigs/` directory.
121121

122122
```bash
@@ -132,7 +132,7 @@ directory to be `HOME/newdir/.docker`.
132132
echo export DOCKER_CONFIG=$HOME/newdir/.docker > ~/.profile
133133
```
134134

135-
#### `config.json` properties
135+
### `config.json` properties
136136

137137
The `config.json` file stores a JSON encoding of several properties:
138138

components/cli/docs/reference/commandline/pause.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ Options:
2727
## Description
2828

2929
The `docker pause` command suspends all processes in the specified containers.
30-
On Linux, this uses the cgroups freezer. Traditionally, when suspending a process
30+
On Linux, this uses the freezer cgroup. Traditionally, when suspending a process
3131
the `SIGSTOP` signal is used, which is observable by the process being suspended.
32-
With the cgroups freezer the process is unaware, and unable to capture,
32+
With the freezer cgroup the process is unaware, and unable to capture,
3333
that it is being suspended, and subsequently resumed. On Windows, only Hyper-V
3434
containers can be paused.
3535

3636
See the
37-
[cgroups freezer documentation](https://www.kernel.org/doc/Documentation/cgroup-v1/freezer-subsystem.txt)
37+
[freezer cgroup documentation](https://www.kernel.org/doc/Documentation/cgroup-v1/freezer-subsystem.txt)
3838
for further details.
3939

4040
## Examples

components/cli/docs/reference/commandline/ps.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,22 @@ $ docker ps -a
7575
container that exposes TCP ports `100, 101, 102` displays `100-102/tcp` in
7676
the `PORTS` column.
7777

78+
### Show disk usage by container
79+
80+
The `docker ps -s` command displays two different on-disk-sizes for each container:
81+
82+
```bash
83+
$ docker ps -s
84+
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES SIZE SIZE
85+
e90b8831a4b8 nginx "/bin/bash -c 'mkdir " 11 weeks ago Up 4 hours my_nginx 35.58 kB (virtual 109.2 MB)
86+
00c6131c5e30 telegraf:1.5 "/entrypoint.sh" 11 weeks ago Up 11 weeks my_telegraf 0 B (virtual 209.5 MB)
87+
```
88+
* The "size" information shows the amount of data (on disk) that is used for the _writable_ layer of each container
89+
* The "virtual size" is the total amount of disk-space used for the read-only _image_ data used by the container and the writable layer.
90+
91+
For more information, refer to the [container size on disk](https://docs.docker.com/storage/storagedriver/#container-size-on-disk) section.
92+
93+
7894
### Filtering
7995

8096
The filtering flag (`-f` or `--filter`) format is a `key=value` pair. If there is more
@@ -431,4 +447,4 @@ a87ecb4f327c com.docker.swarm.node=ubuntu,com.docker.swarm.storage=ssd
431447
01946d9d34d8
432448
c1d3b0166030 com.docker.swarm.node=debian,com.docker.swarm.cpu=6
433449
41d50ecd2f57 com.docker.swarm.node=fedora,com.docker.swarm.cpu=3,com.docker.swarm.storage=ssd
434-
```
450+
```

components/cli/docs/reference/commandline/search.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ This example displays images with a name containing 'busybox',
8383
at least 3 stars and the description isn't truncated in the output:
8484

8585
```bash
86-
$ docker search --stars=3 --no-trunc busybox
86+
$ docker search --filter=stars=3 --no-trunc busybox
8787
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
8888
busybox Busybox base image. 325 [OK]
8989
progrium/busybox 50 [OK]

components/cli/docs/reference/commandline/unpause.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ Options:
2727
## Description
2828

2929
The `docker unpause` command un-suspends all processes in the specified containers.
30-
On Linux, it does this using the cgroups freezer.
30+
On Linux, it does this using the freezer cgroup.
3131

3232
See the
33-
[cgroups freezer documentation](https://www.kernel.org/doc/Documentation/cgroup-v1/freezer-subsystem.txt)
33+
[freezer cgroup documentation](https://www.kernel.org/doc/Documentation/cgroup-v1/freezer-subsystem.txt)
3434
for further details.
3535

3636
## Examples

components/cli/man/src/container/pause.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
The `docker container pause` command suspends all processes in the specified containers.
2-
On Linux, this uses the cgroups freezer. Traditionally, when suspending a process
2+
On Linux, this uses the freezer cgroup. Traditionally, when suspending a process
33
the `SIGSTOP` signal is used, which is observable by the process being suspended.
4-
With the cgroups freezer the process is unaware, and unable to capture,
4+
With the freezer cgroup the process is unaware, and unable to capture,
55
that it is being suspended, and subsequently resumed. On Windows, only Hyper-V
66
containers can be paused.
77

8-
See the [cgroups freezer documentation]
8+
See the [freezer cgroup documentation]
99
(https://www.kernel.org/doc/Documentation/cgroup-v1/freezer-subsystem.txt) for
1010
further details.
1111

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The `docker container unpause` command un-suspends all processes in a container.
2-
On Linux, it does this using the cgroups freezer.
2+
On Linux, it does this using the freezer cgroup.
33

4-
See the [cgroups freezer documentation]
4+
See the [freezer cgroup documentation]
55
(https://www.kernel.org/doc/Documentation/cgroup-v1/freezer-subsystem.txt) for
66
further details.

0 commit comments

Comments
 (0)