|
@@ -300,7 +300,6 @@ The `volume` filter shows only containers that mount a specific volume or have
|
|
a volume mounted in a specific path:
|
|
a volume mounted in a specific path:
|
|
|
|
|
|
```bash
|
|
```bash
|
|
-{% raw %}
|
|
|
|
$ docker ps --filter volume=remote-volume --format "table {{.ID}}\t{{.Mounts}}"
|
|
$ docker ps --filter volume=remote-volume --format "table {{.ID}}\t{{.Mounts}}"
|
|
CONTAINER ID MOUNTS
|
|
CONTAINER ID MOUNTS
|
|
9c3527ed70ce remote-volume
|
|
9c3527ed70ce remote-volume
|
|
@@ -308,7 +307,6 @@ CONTAINER ID MOUNTS
|
|
$ docker ps --filter volume=/data --format "table {{.ID}}\t{{.Mounts}}"
|
|
$ docker ps --filter volume=/data --format "table {{.ID}}\t{{.Mounts}}"
|
|
CONTAINER ID MOUNTS
|
|
CONTAINER ID MOUNTS
|
|
9c3527ed70ce remote-volume
|
|
9c3527ed70ce remote-volume
|
|
-{% endraw %}
|
|
|
|
```
|
|
```
|
|
|
|
|
|
#### network
|
|
#### network
|
|
@@ -334,9 +332,7 @@ example shows all containers that are attached to the `net1` network, using
|
|
the network id as a filter;
|
|
the network id as a filter;
|
|
|
|
|
|
```bash
|
|
```bash
|
|
-{% raw %}
|
|
|
|
$ docker network inspect --format "{{.ID}}" net1
|
|
$ docker network inspect --format "{{.ID}}" net1
|
|
-{% endraw %}
|
|
|
|
|
|
|
|
8c0b4110ae930dbe26b258de9bc34a03f98056ed6f27f991d32919bfe401d7c5
|
|
8c0b4110ae930dbe26b258de9bc34a03f98056ed6f27f991d32919bfe401d7c5
|
|
|
|
|
|
@@ -403,7 +399,7 @@ Placeholder | Description
|
|
`.Size` | Container disk size.
|
|
`.Size` | Container disk size.
|
|
`.Names` | Container names.
|
|
`.Names` | Container names.
|
|
`.Labels` | All labels assigned to the container.
|
|
`.Labels` | All labels assigned to the container.
|
|
-`.Label` | Value of a specific label for this container. For example `'{% raw %}{{.Label "com.docker.swarm.cpu"}}{% endraw %}'`
|
|
|
|
|
|
+`.Label` | Value of a specific label for this container. For example `'{{.Label "com.docker.swarm.cpu"}}'`
|
|
`.Mounts` | Names of the volumes mounted in this container.
|
|
`.Mounts` | Names of the volumes mounted in this container.
|
|
`.Networks` | Names of the networks attached to this container.
|
|
`.Networks` | Names of the networks attached to this container.
|
|
|
|
|
|
@@ -415,9 +411,7 @@ The following example uses a template without headers and outputs the `ID` and
|
|
`Command` entries separated by a colon for all running containers:
|
|
`Command` entries separated by a colon for all running containers:
|
|
|
|
|
|
```bash
|
|
```bash
|
|
-{% raw %}
|
|
|
|
$ docker ps --format "{{.ID}}: {{.Command}}"
|
|
$ docker ps --format "{{.ID}}: {{.Command}}"
|
|
-{% endraw %}
|
|
|
|
|
|
|
|
a87ecb4f327c: /bin/sh -c #(nop) MA
|
|
a87ecb4f327c: /bin/sh -c #(nop) MA
|
|
01946d9d34d8: /bin/sh -c #(nop) MA
|
|
01946d9d34d8: /bin/sh -c #(nop) MA
|
|
@@ -428,9 +422,7 @@ c1d3b0166030: /bin/sh -c yum -y up
|
|
To list all running containers with their labels in a table format you can use:
|
|
To list all running containers with their labels in a table format you can use:
|
|
|
|
|
|
```bash
|
|
```bash
|
|
-{% raw %}
|
|
|
|
$ docker ps --format "table {{.ID}}\t{{.Labels}}"
|
|
$ docker ps --format "table {{.ID}}\t{{.Labels}}"
|
|
-{% endraw %}
|
|
|
|
|
|
|
|
CONTAINER ID LABELS
|
|
CONTAINER ID LABELS
|
|
a87ecb4f327c com.docker.swarm.node=ubuntu,com.docker.swarm.storage=ssd
|
|
a87ecb4f327c com.docker.swarm.node=ubuntu,com.docker.swarm.storage=ssd
|