diff --git a/config/daemon/index.md b/config/daemon/index.md index 9219acd563..46ae85e695 100644 --- a/config/daemon/index.md +++ b/config/daemon/index.md @@ -48,7 +48,7 @@ configuration. When you start Docker this way, it runs in the foreground and sends its logs directly to your terminal. -```bash +```console $ dockerd 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 configurations as above: -```bash -dockerd --debug \ +```console +$ dockerd --debug \ --tls=true \ --tlscert=/var/docker/server.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. On Linux hosts, use the following command. - ```bash + ```console $ sudo kill -SIGHUP $(pidof dockerd) ``` @@ -292,7 +292,7 @@ by sending a `SIGUSR1` signal to the daemon. - **Linux**: - ```bash + ```console $ sudo kill -SIGUSR1 $(pidof dockerd) ``` diff --git a/config/daemon/ipv6.md b/config/daemon/ipv6.md index 59841b84ca..350c58f0cc 100644 --- a/config/daemon/ipv6.md +++ b/config/daemon/ipv6.md @@ -27,7 +27,7 @@ either IPv4 or IPv6 (or both) with any container, service, or network. 2. Reload the Docker configuration file. - ```bash + ```console $ systemctl reload docker ``` diff --git a/config/daemon/prometheus.md b/config/daemon/prometheus.md index 76b6fc7205..1a8ea618cb 100644 --- a/config/daemon/prometheus.md +++ b/config/daemon/prometheus.md @@ -210,7 +210,7 @@ Next, start a single-replica Prometheus service using this configuration.
-```bash +```console $ docker service create --replicas 1 --name my-prometheus \ --mount type=bind,source=/tmp/prometheus.yml,destination=/etc/prometheus/prometheus.yml \ --publish published=9090,target=9090,protocol=tcp \ @@ -220,7 +220,7 @@ $ docker service create --replicas 1 --name my-prometheus \
-```bash +```console $ docker service create --replicas 1 --name my-prometheus \ --mount type=bind,source=/tmp/prometheus.yml,destination=/etc/prometheus/prometheus.yml \ --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 ping target to anything you like): -```bash +```console $ docker service create \ --replicas 10 \ --name ping_service \ @@ -278,7 +278,7 @@ your graph. When you are ready, stop and remove the `ping_service` service, so that you are not flooding a host with pings for no reason. -```bash +```console $ docker service remove ping_service ``` diff --git a/config/formatting.md b/config/formatting.md index 1106aef498..5436f0d8df 100644 --- a/config/formatting.md +++ b/config/formatting.md @@ -20,8 +20,8 @@ include examples of customizing the output format. > In a Posix shell, you can run the following with a single quote: > > {% raw %} -> ```bash -> docker inspect --format '{{join .Args " , "}}' +> ```console +> $ docker inspect --format '{{join .Args " , "}}' > ``` > {% endraw %} > @@ -29,8 +29,8 @@ include examples of customizing the output format. > escape the double quotes inside the params as follows: > > {% raw %} -> ```bash -> docker inspect --format '{{join .Args \" , \"}}' +> ```console +> $ docker inspect --format '{{join .Args \" , \"}}' > ``` > {% endraw %} > diff --git a/config/pruning.md b/config/pruning.md index 2589b5acbd..b59661415a 100644 --- a/config/pruning.md +++ b/config/pruning.md @@ -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 dangling images: -```bash +```console $ docker image prune 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` flag: -```bash +```console $ docker image prune -a 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 hours ago: -```bash +```console $ 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 prune` command. -```bash +```console $ docker container prune 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 stopped containers older than 24 hours: -```bash +```console $ 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 data. -```bash +```console $ docker volume prune 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 volumes which are not labelled with the `keep` label: -```bash +```console $ 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 by any containers. -```bash +```console $ docker network prune 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 networks older than 24 hours: -```bash +```console $ 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 `--volumes` flag for `docker system prune` to prune volumes. -```bash +```console $ docker system prune 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: -```bash +```console $ docker system prune --volumes WARNING! This will remove: