Skip to content

Commit fbfa187

Browse files
committed
config: use "console" for shell examples
This allows for easier copying of the commands, without selecting the prompt. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent 07620d9 commit fbfa187

5 files changed

Lines changed: 25 additions & 25 deletions

File tree

config/daemon/index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ configuration.
4848
When you start Docker this way, it runs in the foreground and sends its logs
4949
directly to your terminal.
5050

51-
```bash
51+
```console
5252
$ dockerd
5353

5454
INFO[0000] +job init_networkdriver()
@@ -98,8 +98,8 @@ This can be useful for troubleshooting problems.
9898
Here's an example of how to manually start the Docker daemon, using the same
9999
configurations as above:
100100

101-
```bash
102-
dockerd --debug \
101+
```console
102+
$ dockerd --debug \
103103
--tls=true \
104104
--tlscert=/var/docker/server.pem \
105105
--tlskey=/var/docker/serverkey.pem \
@@ -274,7 +274,7 @@ Docker platform.
274274
3. Send a `HUP` signal to the daemon to cause it to reload its configuration.
275275
On Linux hosts, use the following command.
276276

277-
```bash
277+
```console
278278
$ sudo kill -SIGHUP $(pidof dockerd)
279279
```
280280

@@ -292,7 +292,7 @@ by sending a `SIGUSR1` signal to the daemon.
292292

293293
- **Linux**:
294294

295-
```bash
295+
```console
296296
$ sudo kill -SIGUSR1 $(pidof dockerd)
297297
```
298298

config/daemon/ipv6.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ either IPv4 or IPv6 (or both) with any container, service, or network.
2727

2828
2. Reload the Docker configuration file.
2929

30-
```bash
30+
```console
3131
$ systemctl reload docker
3232
```
3333

config/daemon/prometheus.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ Next, start a single-replica Prometheus service using this configuration.
210210
211211
<div id="linux-run" class="tab-pane fade in active" markdown="1">
212212
213-
```bash
213+
```console
214214
$ docker service create --replicas 1 --name my-prometheus \
215215
--mount type=bind,source=/tmp/prometheus.yml,destination=/etc/prometheus/prometheus.yml \
216216
--publish published=9090,target=9090,protocol=tcp \
@@ -220,7 +220,7 @@ $ docker service create --replicas 1 --name my-prometheus \
220220
</div><!-- linux -->
221221
<div id="mac-run" class="tab-pane fade" markdown="1">
222222

223-
```bash
223+
```console
224224
$ docker service create --replicas 1 --name my-prometheus \
225225
--mount type=bind,source=/tmp/prometheus.yml,destination=/etc/prometheus/prometheus.yml \
226226
--publish published=9090,target=9090,protocol=tcp \
@@ -263,7 +263,7 @@ To make the graph more interesting, create some network actions by starting
263263
a service with 10 tasks that just ping Docker non-stop (you can change the
264264
ping target to anything you like):
265265

266-
```bash
266+
```console
267267
$ docker service create \
268268
--replicas 10 \
269269
--name ping_service \
@@ -278,7 +278,7 @@ your graph.
278278
When you are ready, stop and remove the `ping_service` service, so that you
279279
are not flooding a host with pings for no reason.
280280

281-
```bash
281+
```console
282282
$ docker service remove ping_service
283283
```
284284

config/formatting.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,17 @@ include examples of customizing the output format.
2020
> In a Posix shell, you can run the following with a single quote:
2121
>
2222
> {% raw %}
23-
> ```bash
24-
> docker inspect --format '{{join .Args " , "}}'
23+
> ```console
24+
> $ docker inspect --format '{{join .Args " , "}}'
2525
> ```
2626
> {% endraw %}
2727
>
2828
> Otherwise, in a Windows shell (for example, PowerShell), you need to use single quotes, but
2929
> escape the double quotes inside the params as follows:
3030
>
3131
> {% raw %}
32-
> ```bash
33-
> docker inspect --format '{{join .Args \" , \"}}'
32+
> ```console
33+
> $ docker inspect --format '{{join .Args \" , \"}}'
3434
> ```
3535
> {% endraw %}
3636
>

config/pruning.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ default, `docker image prune` only cleans up _dangling_ images. A dangling image
2121
is one that is not tagged and is not referenced by any container. To remove
2222
dangling images:
2323

24-
```bash
24+
```console
2525
$ docker image prune
2626

2727
WARNING! This will remove all dangling images.
@@ -31,7 +31,7 @@ Are you sure you want to continue? [y/N] y
3131
To remove all images which are not used by existing containers, use the `-a`
3232
flag:
3333

34-
```bash
34+
```console
3535
$ docker image prune -a
3636

3737
WARNING! This will remove all images without at least one container associated to them.
@@ -45,7 +45,7 @@ You can limit which images are pruned using filtering expressions with the
4545
`--filter` flag. For example, to only consider images created more than 24
4646
hours ago:
4747

48-
```bash
48+
```console
4949
$ docker image prune -a --filter "until=24h"
5050
```
5151

@@ -62,7 +62,7 @@ exist, especially on a development system! A stopped container's writable layers
6262
still take up disk space. To clean this up, you can use the `docker container
6363
prune` command.
6464

65-
```bash
65+
```console
6666
$ docker container prune
6767

6868
WARNING! This will remove all stopped containers.
@@ -76,7 +76,7 @@ By default, all stopped containers are removed. You can limit the scope using
7676
the `--filter` flag. For instance, the following command only removes
7777
stopped containers older than 24 hours:
7878

79-
```bash
79+
```console
8080
$ docker container prune --filter "until=24h"
8181
```
8282

@@ -90,7 +90,7 @@ Volumes can be used by one or more containers, and take up space on the Docker
9090
host. Volumes are never removed automatically, because to do so could destroy
9191
data.
9292

93-
```bash
93+
```console
9494
$ docker volume prune
9595

9696
WARNING! This will remove all volumes not used by at least one container.
@@ -104,7 +104,7 @@ By default, all unused volumes are removed. You can limit the scope using
104104
the `--filter` flag. For instance, the following command only removes
105105
volumes which are not labelled with the `keep` label:
106106

107-
```bash
107+
```console
108108
$ docker volume prune --filter "label!=keep"
109109
```
110110

@@ -119,7 +119,7 @@ rules, bridge network devices, and routing table entries. To clean these things
119119
up, you can use `docker network prune` to clean up networks which aren't used
120120
by any containers.
121121

122-
```bash
122+
```console
123123
$ docker network prune
124124

125125
WARNING! This will remove all networks not used by at least one container.
@@ -133,7 +133,7 @@ By default, all unused networks are removed. You can limit the scope using
133133
the `--filter` flag. For instance, the following command only removes
134134
networks older than 24 hours:
135135

136-
```bash
136+
```console
137137
$ docker network prune --filter "until=24h"
138138
```
139139

@@ -147,7 +147,7 @@ The `docker system prune` command is a shortcut that prunes images, containers,
147147
and networks. Volumes are not pruned by default, and you must specify the
148148
`--volumes` flag for `docker system prune` to prune volumes.
149149

150-
```bash
150+
```console
151151
$ docker system prune
152152

153153
WARNING! This will remove:
@@ -160,7 +160,7 @@ Are you sure you want to continue? [y/N] y
160160

161161
To also prune volumes, add the `--volumes` flag:
162162

163-
```bash
163+
```console
164164
$ docker system prune --volumes
165165

166166
WARNING! This will remove:

0 commit comments

Comments
 (0)