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>
This commit is contained in:
Sebastiaan van Stijn 2021-08-06 17:14:13 +02:00
parent 07620d95f2
commit fbfa187a83
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
5 changed files with 25 additions and 25 deletions

View File

@ -48,7 +48,7 @@ configuration.
When you start Docker this way, it runs in the foreground and sends its logs When you start Docker this way, it runs in the foreground and sends its logs
directly to your terminal. directly to your terminal.
```bash ```console
$ dockerd $ dockerd
INFO[0000] +job init_networkdriver() INFO[0000] +job init_networkdriver()
@ -98,8 +98,8 @@ This can be useful for troubleshooting problems.
Here's an example of how to manually start the Docker daemon, using the same Here's an example of how to manually start the Docker daemon, using the same
configurations as above: configurations as above:
```bash ```console
dockerd --debug \ $ dockerd --debug \
--tls=true \ --tls=true \
--tlscert=/var/docker/server.pem \ --tlscert=/var/docker/server.pem \
--tlskey=/var/docker/serverkey.pem \ --tlskey=/var/docker/serverkey.pem \
@ -274,7 +274,7 @@ Docker platform.
3. Send a `HUP` signal to the daemon to cause it to reload its configuration. 3. Send a `HUP` signal to the daemon to cause it to reload its configuration.
On Linux hosts, use the following command. On Linux hosts, use the following command.
```bash ```console
$ sudo kill -SIGHUP $(pidof dockerd) $ sudo kill -SIGHUP $(pidof dockerd)
``` ```
@ -292,7 +292,7 @@ by sending a `SIGUSR1` signal to the daemon.
- **Linux**: - **Linux**:
```bash ```console
$ sudo kill -SIGUSR1 $(pidof dockerd) $ sudo kill -SIGUSR1 $(pidof dockerd)
``` ```

View File

@ -27,7 +27,7 @@ either IPv4 or IPv6 (or both) with any container, service, or network.
2. Reload the Docker configuration file. 2. Reload the Docker configuration file.
```bash ```console
$ systemctl reload docker $ systemctl reload docker
``` ```

View File

@ -210,7 +210,7 @@ Next, start a single-replica Prometheus service using this configuration.
<div id="linux-run" class="tab-pane fade in active" markdown="1"> <div id="linux-run" class="tab-pane fade in active" markdown="1">
```bash ```console
$ docker service create --replicas 1 --name my-prometheus \ $ docker service create --replicas 1 --name my-prometheus \
--mount type=bind,source=/tmp/prometheus.yml,destination=/etc/prometheus/prometheus.yml \ --mount type=bind,source=/tmp/prometheus.yml,destination=/etc/prometheus/prometheus.yml \
--publish published=9090,target=9090,protocol=tcp \ --publish published=9090,target=9090,protocol=tcp \
@ -220,7 +220,7 @@ $ docker service create --replicas 1 --name my-prometheus \
</div><!-- linux --> </div><!-- linux -->
<div id="mac-run" class="tab-pane fade" markdown="1"> <div id="mac-run" class="tab-pane fade" markdown="1">
```bash ```console
$ docker service create --replicas 1 --name my-prometheus \ $ docker service create --replicas 1 --name my-prometheus \
--mount type=bind,source=/tmp/prometheus.yml,destination=/etc/prometheus/prometheus.yml \ --mount type=bind,source=/tmp/prometheus.yml,destination=/etc/prometheus/prometheus.yml \
--publish published=9090,target=9090,protocol=tcp \ --publish published=9090,target=9090,protocol=tcp \
@ -263,7 +263,7 @@ To make the graph more interesting, create some network actions by starting
a service with 10 tasks that just ping Docker non-stop (you can change the a service with 10 tasks that just ping Docker non-stop (you can change the
ping target to anything you like): ping target to anything you like):
```bash ```console
$ docker service create \ $ docker service create \
--replicas 10 \ --replicas 10 \
--name ping_service \ --name ping_service \
@ -278,7 +278,7 @@ your graph.
When you are ready, stop and remove the `ping_service` service, so that you When you are ready, stop and remove the `ping_service` service, so that you
are not flooding a host with pings for no reason. are not flooding a host with pings for no reason.
```bash ```console
$ docker service remove ping_service $ docker service remove ping_service
``` ```

View File

@ -20,8 +20,8 @@ include examples of customizing the output format.
> In a Posix shell, you can run the following with a single quote: > In a Posix shell, you can run the following with a single quote:
> >
> {% raw %} > {% raw %}
> ```bash > ```console
> docker inspect --format '{{join .Args " , "}}' > $ docker inspect --format '{{join .Args " , "}}'
> ``` > ```
> {% endraw %} > {% endraw %}
> >
@ -29,8 +29,8 @@ include examples of customizing the output format.
> escape the double quotes inside the params as follows: > escape the double quotes inside the params as follows:
> >
> {% raw %} > {% raw %}
> ```bash > ```console
> docker inspect --format '{{join .Args \" , \"}}' > $ docker inspect --format '{{join .Args \" , \"}}'
> ``` > ```
> {% endraw %} > {% endraw %}
> >

View File

@ -21,7 +21,7 @@ default, `docker image prune` only cleans up _dangling_ images. A dangling image
is one that is not tagged and is not referenced by any container. To remove is one that is not tagged and is not referenced by any container. To remove
dangling images: dangling images:
```bash ```console
$ docker image prune $ docker image prune
WARNING! This will remove all dangling images. WARNING! This will remove all dangling images.
@ -31,7 +31,7 @@ Are you sure you want to continue? [y/N] y
To remove all images which are not used by existing containers, use the `-a` To remove all images which are not used by existing containers, use the `-a`
flag: flag:
```bash ```console
$ docker image prune -a $ docker image prune -a
WARNING! This will remove all images without at least one container associated to them. 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
`--filter` flag. For example, to only consider images created more than 24 `--filter` flag. For example, to only consider images created more than 24
hours ago: hours ago:
```bash ```console
$ docker image prune -a --filter "until=24h" $ docker image prune -a --filter "until=24h"
``` ```
@ -62,7 +62,7 @@ exist, especially on a development system! A stopped container's writable layers
still take up disk space. To clean this up, you can use the `docker container still take up disk space. To clean this up, you can use the `docker container
prune` command. prune` command.
```bash ```console
$ docker container prune $ docker container prune
WARNING! This will remove all stopped containers. WARNING! This will remove all stopped containers.
@ -76,7 +76,7 @@ By default, all stopped containers are removed. You can limit the scope using
the `--filter` flag. For instance, the following command only removes the `--filter` flag. For instance, the following command only removes
stopped containers older than 24 hours: stopped containers older than 24 hours:
```bash ```console
$ docker container prune --filter "until=24h" $ docker container prune --filter "until=24h"
``` ```
@ -90,7 +90,7 @@ Volumes can be used by one or more containers, and take up space on the Docker
host. Volumes are never removed automatically, because to do so could destroy host. Volumes are never removed automatically, because to do so could destroy
data. data.
```bash ```console
$ docker volume prune $ docker volume prune
WARNING! This will remove all volumes not used by at least one container. 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
the `--filter` flag. For instance, the following command only removes the `--filter` flag. For instance, the following command only removes
volumes which are not labelled with the `keep` label: volumes which are not labelled with the `keep` label:
```bash ```console
$ docker volume prune --filter "label!=keep" $ docker volume prune --filter "label!=keep"
``` ```
@ -119,7 +119,7 @@ rules, bridge network devices, and routing table entries. To clean these things
up, you can use `docker network prune` to clean up networks which aren't used up, you can use `docker network prune` to clean up networks which aren't used
by any containers. by any containers.
```bash ```console
$ docker network prune $ docker network prune
WARNING! This will remove all networks not used by at least one container. 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
the `--filter` flag. For instance, the following command only removes the `--filter` flag. For instance, the following command only removes
networks older than 24 hours: networks older than 24 hours:
```bash ```console
$ docker network prune --filter "until=24h" $ docker network prune --filter "until=24h"
``` ```
@ -147,7 +147,7 @@ The `docker system prune` command is a shortcut that prunes images, containers,
and networks. Volumes are not pruned by default, and you must specify the and networks. Volumes are not pruned by default, and you must specify the
`--volumes` flag for `docker system prune` to prune volumes. `--volumes` flag for `docker system prune` to prune volumes.
```bash ```console
$ docker system prune $ docker system prune
WARNING! This will remove: WARNING! This will remove:
@ -160,7 +160,7 @@ Are you sure you want to continue? [y/N] y
To also prune volumes, add the `--volumes` flag: To also prune volumes, add the `--volumes` flag:
```bash ```console
$ docker system prune --volumes $ docker system prune --volumes
WARNING! This will remove: WARNING! This will remove: