Sebastiaan van Stijn 1fdbd6181e
docker ps: add State field to formatting
The State field allows printing the container state without
additional information about uptime, healthcheck, etc.

With this patch, the container's state can be printed independently:

```bash
docker ps -a --format '{{.State}}'
running
paused
exited
created
```

```bash
docker ps -a --format 'table {{.Names}}\t{{.State}}\t{{.Status}}'
NAMES                     STATE               STATUS
elastic_burnell           running             Up About a minute
pausie                    paused              Up 5 minutes (Paused)
peaceful_stonebraker      exited              Exited (0) 10 hours ago
vigilant_shaw             created             Created
```

```bash
docker ps -a --format 'raw'

container_id: 0445f73f3a71
image: docker-cli-dev
command: "ash"
created_at: 2019-07-12 11:16:11 +0000 UTC
state: running
status: Up 2 minutes
names: elastic_burnell
labels:
ports:

container_id: 1aff69a3912c
image: nginx:alpine
command: "nginx -g 'daemon of ..."
created_at: 2019-07-12 11:12:10 +0000 UTC
state: paused
status: Up 6 minutes (Paused)
names: pausie
labels: maintainer=NGINX Docker Maintainers <docker-maint@nginx.com>
ports: 80/tcp

container_id: d48acf66c318
image: alpine:3.9.3
command: "id -u"
created_at: 2019-07-12 00:52:17 +0000 UTC
state: exited
status: Exited (0) 10 hours ago
names: peaceful_stonebraker
labels:
ports:

container_id: a0733fe0dace
image: b7b28af77ffe
command: "/bin/sh -c '#(nop) ..."
created_at: 2019-07-12 00:51:29 +0000 UTC
state: created
status: Created
names: vigilant_shaw
labels:
ports:
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-07-12 13:31:16 +02:00
..
2019-02-07 13:23:13 +01:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00
2019-01-10 22:25:43 +01:00
2019-01-10 22:25:43 +01:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00
2019-05-13 16:37:30 -07:00
2018-05-16 20:16:08 +08:00
2018-01-30 11:29:45 -08:00
2017-10-05 01:14:31 +08:00
2017-10-31 15:21:51 +05:00
2018-02-20 14:58:55 +01:00
2018-04-16 16:39:54 +02:00
2018-10-04 11:14:17 +02:00
2018-10-04 11:14:17 +02:00
2018-05-16 20:16:08 +08:00
2019-01-20 01:20:34 +08:00
2017-10-05 01:14:31 +08:00
2017-10-31 15:21:51 +05:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00
2019-07-12 13:31:16 +02:00
2018-12-19 13:48:41 +01:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00
2019-01-21 16:15:45 +01:00
2019-07-09 09:14:10 -07:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00
2019-01-30 11:00:38 -05:00
2017-10-05 01:14:31 +08:00
2018-01-31 16:51:43 -08:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00
2018-03-13 16:50:56 -07:00
2018-03-13 16:50:56 -07:00
2018-03-13 16:50:56 -07:00
2018-03-13 16:50:56 -07:00
2018-03-13 16:50:56 -07:00
2018-03-13 16:50:56 -07:00
2017-10-26 23:55:03 -07:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00
2017-10-05 01:14:31 +08:00