diff --git a/docs/reference/commandline/node_ls.md b/docs/reference/commandline/node_ls.md index f446568b3c..0118342a67 100644 --- a/docs/reference/commandline/node_ls.md +++ b/docs/reference/commandline/node_ls.md @@ -29,12 +29,14 @@ Lists all the nodes that the Docker Swarm manager knows about. You can filter us Example output: - $ docker node ls - ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS - 1bcef6utixb0l0ca7gxuivsj0 swarm-worker2 Ready Active - 38ciaotwjuritcdtn9npbnkuz swarm-worker1 Ready Active - e216jshn25ckzbvmwlnh5jr3g * swarm-manager1 Ready Active Leader +```bash +$ docker node ls +ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS +1bcef6utixb0l0ca7gxuivsj0 swarm-worker2 Ready Active +38ciaotwjuritcdtn9npbnkuz swarm-worker1 Ready Active +e216jshn25ckzbvmwlnh5jr3g * swarm-manager1 Ready Active Leader +``` ## Filtering @@ -53,18 +55,23 @@ The `name` filter matches on all or part of a node name. The following filter matches the node with a name equal to `swarm-master` string. - $ docker node ls -f name=swarm-manager1 - ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS - e216jshn25ckzbvmwlnh5jr3g * swarm-manager1 Ready Active Leader +```bash +$ docker node ls -f name=swarm-manager1 + +ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS +e216jshn25ckzbvmwlnh5jr3g * swarm-manager1 Ready Active Leader +``` ### id The `id` filter matches all or part of a node's id. - $ docker node ls -f id=1 - ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS - 1bcef6utixb0l0ca7gxuivsj0 swarm-worker2 Ready Active +```bash +$ docker node ls -f id=1 +ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS +1bcef6utixb0l0ca7gxuivsj0 swarm-worker2 Ready Active +``` #### label @@ -75,6 +82,7 @@ The following filter matches nodes with the `usage` label regardless of its valu ```bash $ docker node ls -f "label=foo" + ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS 1bcef6utixb0l0ca7gxuivsj0 swarm-worker2 Ready Active ```