1fdbd6181e
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> |
||
---|---|---|
.github | ||
cli | ||
cli-plugins | ||
cmd/docker | ||
contrib/completion | ||
dockerfiles | ||
docs | ||
e2e | ||
experimental | ||
internal | ||
kubernetes | ||
man | ||
opts | ||
scripts | ||
service/logs | ||
templates | ||
types | ||
vendor | ||
.dockerignore | ||
.gitignore | ||
.mailmap | ||
AUTHORS | ||
CONTRIBUTING.md | ||
Jenkinsfile | ||
LICENSE | ||
MAINTAINERS | ||
Makefile | ||
NOTICE | ||
README.md | ||
TESTING.md | ||
VERSION | ||
appveyor.yml | ||
circle.yml | ||
codecov.yml | ||
docker.Makefile | ||
gometalinter.json | ||
poule.yml | ||
vendor.conf |
README.md
docker/cli
This repository is the home of the cli used in the Docker CE and Docker EE products.
Development
docker/cli
is developed using Docker.
Build a linux binary:
$ make -f docker.Makefile binary
Build binaries for all supported platforms:
$ make -f docker.Makefile cross
Run all linting:
$ make -f docker.Makefile lint
List all the available targets:
$ make help
In-container development environment
Start an interactive development environment:
$ make -f docker.Makefile shell
In the development environment you can run many tasks, including build binaries:
$ make binary
Legal
Brought to you courtesy of our legal counsel. For more context, please see the NOTICE document in this repo.
Use and transfer of Docker may be subject to certain restrictions by the United States and other governments.
It is your responsibility to ensure that your use and/or transfer does not violate applicable laws.
For more information, please see https://www.bis.doc.gov
Licensing
docker/cli is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.