Skip to content

Commit 1d06741

Browse files
thaJeztahndeloof
authored andcommitted
docs: fix trailing whitespace from markdown and regenerate
Trailing whitespace in Markdown can force line-breaks, which doesn't seem to be the intent on these; find . -type f -print0 | xargs -0 perl -pi -e 's/ +$//' The trailing whitespace also can cause the YAML to go wonky (although the cli-docs-tool now takes that into account), and caused the "examples" section to be missed in the `docker compose pull` page (something we should fix in the tool). Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 35b790d commit 1d06741

11 files changed

+87
-46
lines changed

docs/reference/compose.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ multiple services in Docker containers.
99
Use the `-f` flag to specify the location of a Compose configuration file.
1010

1111
#### Specifying multiple Compose files
12-
You can supply multiple `-f` configuration files. When you supply multiple files, Compose combines them into a single
13-
configuration. Compose builds the configuration in the order you supply the files. Subsequent files override and add
12+
You can supply multiple `-f` configuration files. When you supply multiple files, Compose combines them into a single
13+
configuration. Compose builds the configuration in the order you supply the files. Subsequent files override and add
1414
to their predecessors.
1515

1616
For example, consider this command line:
@@ -30,7 +30,7 @@ services:
3030
volumes:
3131
- "/data"
3232
```
33-
If the `docker-compose.admin.yml` also specifies this same service, any matching fields override the previous file.
33+
If the `docker-compose.admin.yml` also specifies this same service, any matching fields override the previous file.
3434
New values, add to the `webapp` service configuration.
3535

3636
```yaml
@@ -41,40 +41,40 @@ services:
4141
- DEBUG=1
4242
```
4343

44-
When you use multiple Compose files, all paths in the files are relative to the first configuration file specified
44+
When you use multiple Compose files, all paths in the files are relative to the first configuration file specified
4545
with `-f`. You can use the `--project-directory` option to override this base path.
4646

47-
Use a `-f` with `-` (dash) as the filename to read the configuration from stdin. When stdin is used all paths in the
47+
Use a `-f` with `-` (dash) as the filename to read the configuration from stdin. When stdin is used all paths in the
4848
configuration are relative to the current working directory.
4949

50-
The `-f` flag is optional. If you don’t provide this flag on the command line, Compose traverses the working directory
50+
The `-f` flag is optional. If you don’t provide this flag on the command line, Compose traverses the working directory
5151
and its parent directories looking for a `compose.yaml` or `docker-compose.yaml` file.
5252

5353
#### Specifying a path to a single Compose file
54-
You can use the `-f` flag to specify a path to a Compose file that is not located in the current directory, either
54+
You can use the `-f` flag to specify a path to a Compose file that is not located in the current directory, either
5555
from the command line or by setting up a `COMPOSE_FILE` environment variable in your shell or in an environment file.
5656

57-
For an example of using the `-f` option at the command line, suppose you are running the Compose Rails sample, and
58-
have a `compose.yaml` file in a directory called `sandbox/rails`. You can use a command like `docker compose pull` to
59-
get the postgres image for the db service from anywhere by using the `-f` flag as follows:
57+
For an example of using the `-f` option at the command line, suppose you are running the Compose Rails sample, and
58+
have a `compose.yaml` file in a directory called `sandbox/rails`. You can use a command like `docker compose pull` to
59+
get the postgres image for the db service from anywhere by using the `-f` flag as follows:
6060

6161
```console
6262
$ docker compose -f ~/sandbox/rails/compose.yaml pull db
6363
```
6464

6565
### Use `-p` to specify a project name
6666

67-
Each configuration has a project name. If you supply a `-p` flag, you can specify a project name. If you don’t
68-
specify the flag, Compose uses the current directory name.
67+
Each configuration has a project name. If you supply a `-p` flag, you can specify a project name. If you don’t
68+
specify the flag, Compose uses the current directory name.
6969
Project name can also be set by `COMPOSE_PROJECT_NAME` environment variable.
7070

71-
Most compose subcommand can be ran without a compose file, just passing
71+
Most compose subcommand can be ran without a compose file, just passing
7272
project name to retrieve the relevant resources.
7373

7474
```console
7575
$ docker compose -p my_project ps -a
7676
NAME SERVICE STATUS PORTS
77-
my_project_demo_1 demo running
77+
my_project_demo_1 demo running
7878
7979
$ docker compose -p my_project logs
8080
demo_1 | PING localhost (127.0.0.1): 56 data bytes
@@ -84,8 +84,8 @@ demo_1 | 64 bytes from 127.0.0.1: seq=0 ttl=64 time=0.095 ms
8484
### Use profiles to enable optional services
8585

8686
Use `--profile` to specify one or more active profiles
87-
Calling `docker compose --profile frontend up` will start the services with the profile `frontend` and services
88-
without any specified profiles.
87+
Calling `docker compose --profile frontend up` will start the services with the profile `frontend` and services
88+
without any specified profiles.
8989
You can also enable multiple profiles, e.g. with `docker compose --profile frontend --profile debug up` the profiles `frontend` and `debug` will be enabled.
9090

9191
Profiles can also be set by `COMPOSE_PROFILES` environment variable.
@@ -100,5 +100,5 @@ and so does `COMPOSE_PROFILES` environment variable for to the `--profiles` flag
100100

101101
If flags are explicitly set on command line, associated environment variable is ignored
102102

103-
Setting the `COMPOSE_IGNORE_ORPHANS` environment variable to `true` will stop docker compose from detecting orphaned
103+
Setting the `COMPOSE_IGNORE_ORPHANS` environment variable to `true` will stop docker compose from detecting orphaned
104104
containers for the project.

docs/reference/compose_build.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11

22
## Description
33

4-
Services are built once and then tagged, by default as `project_service`.
4+
Services are built once and then tagged, by default as `project_service`.
55

66
If the Compose file specifies an
7-
[image](https://github.com/compose-spec/compose-spec/blob/master/spec.md#image) name,
7+
[image](https://github.com/compose-spec/compose-spec/blob/master/spec.md#image) name,
88
the image is tagged with that name, substituting any variables beforehand. See
99
[variable interpolation](https://github.com/compose-spec/compose-spec/blob/master/spec.md#interpolation).
1010

11-
If you change a service's `Dockerfile` or the contents of its build directory,
11+
If you change a service's `Dockerfile` or the contents of its build directory,
1212
run `docker compose build` to rebuild it.

docs/reference/compose_convert.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Description
44

55
`docker compose convert` render the actual data model to be applied on target platform. When used with Docker engine,
6-
it merges the Compose files set by `-f` flags, resolves variables in Compose file, and expands short-notation into
7-
fully defined Compose model.
6+
it merges the Compose files set by `-f` flags, resolves variables in Compose file, and expands short-notation into
7+
fully defined Compose model.
88

99
To allow smooth migration from docker-compose, this subcommand declares alias `docker compose config`

docs/reference/compose_exec.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
## Description
33

4-
This is the equivalent of `docker exec` targeting a Compose service.
4+
This is the equivalent of `docker exec` targeting a Compose service.
55

6-
With this subcommand you can run arbitrary commands in your services. Commands are by default allocating a TTY, so
6+
With this subcommand you can run arbitrary commands in your services. Commands are by default allocating a TTY, so
77
you can use a command such as `docker compose exec web sh` to get an interactive prompt.

docs/reference/compose_ps.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ Lists containers for a Compose project, with current status and exposed ports.
77
$ docker compose ps
88
NAME SERVICE STATUS PORTS
99
example_foo_1 foo running (healthy) 0.0.0.0:8000->80/tcp
10-
example_bar_1 bar exited (1)
10+
example_bar_1 bar exited (1)
1111
```

docs/reference/compose_pull.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11

22
## Description
33

4-
Pulls an image associated with a service defined in a `compose.yaml` file, but does not start containers based on
4+
Pulls an image associated with a service defined in a `compose.yaml` file, but does not start containers based on
55
those images.
66

77

8-
## Examples
8+
## Examples
99

1010
suppose you have this `compose.yaml`:
1111

@@ -24,8 +24,8 @@ services:
2424
- db
2525
```
2626
27-
If you run `docker compose pull ServiceName` in the same directory as the `compose.yaml` file that defines the service,
28-
Docker pulls the associated image. For example, to call the postgres image configured as the db service in our example,
27+
If you run `docker compose pull ServiceName` in the same directory as the `compose.yaml` file that defines the service,
28+
Docker pulls the associated image. For example, to call the postgres image configured as the db service in our example,
2929
you would run `docker compose pull db`.
3030

3131
```console
@@ -46,4 +46,4 @@ $ docker compose pull db
4646
⠹ f63c47038e66 Waiting 9.3s
4747
⠹ 77a0c198cde5 Waiting 9.3s
4848
⠹ c8752d5b785c Waiting 9.3s
49-
``̀
49+
``̀`

docs/reference/compose_restart.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Restarts all stopped and running services.
22

3-
If you make changes to your `compose.yml` configuration, these changes are not reflected
4-
after running this command. For example, changes to environment variables (which are added
5-
after a container is built, but before the container's command is executed) are not updated
3+
If you make changes to your `compose.yml` configuration, these changes are not reflected
4+
after running this command. For example, changes to environment variables (which are added
5+
after a container is built, but before the container's command is executed) are not updated
66
after restarting.
77

88
If you are looking to configure a service's restart policy, please refer to

docs/reference/compose_run.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
## Description
33

4-
Runs a one-time command against a service.
4+
Runs a one-time command against a service.
55

66
the following command starts the `web` service and runs `bash` as its command:
77

@@ -12,12 +12,12 @@ $ docker compose run web bash
1212
Commands you use with run start in new containers with configuration defined by that of the service,
1313
including volumes, links, and other details. However, there are two important differences:
1414

15-
First, the command passed by `run` overrides the command defined in the service configuration. For example, if the
16-
`web` service configuration is started with `bash`, then `docker compose run web python app.py` overrides it with
15+
First, the command passed by `run` overrides the command defined in the service configuration. For example, if the
16+
`web` service configuration is started with `bash`, then `docker compose run web python app.py` overrides it with
1717
`python app.py`.
1818

19-
The second difference is that the `docker compose run` command does not create any of the ports specified in the
20-
service configuration. This prevents port collisions with already-open ports. If you do want the service’s ports
19+
The second difference is that the `docker compose run` command does not create any of the ports specified in the
20+
service configuration. This prevents port collisions with already-open ports. If you do want the service’s ports
2121
to be created and mapped to the host, specify the `--service-ports`
2222

2323
```console
@@ -30,8 +30,8 @@ Alternatively, manual port mapping can be specified with the `--publish` or `-p`
3030
$ docker compose run --publish 8080:80 -p 2022:22 -p 127.0.0.1:2021:21 web python manage.py shell
3131
```
3232

33-
If you start a service configured with links, the run command first checks to see if the linked service is running
34-
and starts the service if it is stopped. Once all the linked services are running, the run executes the command you
33+
If you start a service configured with links, the run command first checks to see if the linked service is running
34+
and starts the service if it is stopped. Once all the linked services are running, the run executes the command you
3535
passed it. For example, you could run:
3636

3737
```console
@@ -52,5 +52,5 @@ If you want to remove the container after running while overriding the container
5252
$ docker compose run --rm web python manage.py db upgrade
5353
```
5454

55-
This runs a database upgrade script, and removes the container when finished running, even if a restart policy is
55+
This runs a database upgrade script, and removes the container when finished running, even if a restart policy is
5656
specified in the service configuration.

docs/reference/compose_top.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ Displays the running processes.
99
$ docker compose top
1010
example_foo_1
1111
UID PID PPID C STIME TTY TIME CMD
12-
root 142353 142331 2 15:33 ? 00:00:00 ping localhost -c 5
12+
root 142353 142331 2 15:33 ? 00:00:00 ping localhost -c 5
1313
```

docs/reference/compose_up.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ Builds, (re)creates, starts, and attaches to containers for a service.
55

66
Unless they are already running, this command also starts any linked services.
77

8-
The `docker compose up` command aggregates the output of each container (like `docker compose logs --follow` does).
9-
When the command exits, all containers are stopped. Running `docker compose up --detach` starts the containers in the
8+
The `docker compose up` command aggregates the output of each container (like `docker compose logs --follow` does).
9+
When the command exits, all containers are stopped. Running `docker compose up --detach` starts the containers in the
1010
background and leaves them running.
1111

12-
If there are existing containers for a service, and the service’s configuration or image was changed after the
13-
container’s creation, `docker compose up` picks up the changes by stopping and recreating the containers
12+
If there are existing containers for a service, and the service’s configuration or image was changed after the
13+
container’s creation, `docker compose up` picks up the changes by stopping and recreating the containers
1414
(preserving mounted volumes). To prevent Compose from picking up changes, use the `--no-recreate` flag.
1515

1616
If you want to force Compose to stop and recreate all containers, use the `--force-recreate` flag.

0 commit comments

Comments
 (0)