The Docker CLI
Go to file
Sebastiaan van Stijn be035a0272
YAML docs: add os_type property on flags and (sub)commands
This patch adds an `os_type` property in the generated YAML docs, both for
commands, and for flags;

Note that the ostype annotation on flags can have multiple values set,
however, multiple values are currently not used (and unlikely will).

To simplify usage of the os_type property in the YAML, and for consistency with
the same property for commands, we're only using the first ostype that's set.

```yaml
command: docker checkpoint create
short: Create a checkpoint from a running container
long: Create a checkpoint from a running container
usage: docker checkpoint create [OPTIONS] CONTAINER CHECKPOINT [flags]
pname: docker checkpoint
plink: docker_checkpoint.yaml
options:
- option: checkpoint-dir
  value_type: string
  description: Use a custom checkpoint storage directory
  deprecated: false
  experimental: false
  experimentalcli: false
  kubernetes: false
  swarm: false
- option: leave-running
  value_type: bool
  default_value: "false"
  description: Leave the container running after checkpoint
  deprecated: false
  experimental: false
  experimentalcli: false
  kubernetes: false
  swarm: false
deprecated: false
min_api_version: "1.25"
experimental: true
experimentalcli: false
kubernetes: false
swarm: false
os_type: windows
```

```yaml
command: docker container start
short: Start one or more stopped containers
long: Start one or more stopped containers
usage: docker container start [OPTIONS] CONTAINER [CONTAINER...] [flags]
pname: docker container
plink: docker_container.yaml
options:
- option: attach
  shorthand: a
  value_type: bool
  default_value: "false"
  description: Attach STDOUT/STDERR and forward signals
  deprecated: false
  experimental: false
  experimentalcli: false
  kubernetes: false
  swarm: false
- option: checkpoint
  value_type: string
  description: Restore from this checkpoint
  deprecated: false
  experimental: true
  experimentalcli: false
  kubernetes: false
  swarm: false
  os_type: linux
- option: checkpoint-dir
  value_type: string
  description: Use a custom checkpoint storage directory
  deprecated: false
  experimental: true
  experimentalcli: false
  kubernetes: false
  swarm: false
  os_type: linux
- option: detach-keys
  value_type: string
  description: Override the key sequence for detaching a container
  deprecated: false
  experimental: false
  experimentalcli: false
  kubernetes: false
  swarm: false
- option: interactive
  shorthand: i
  value_type: bool
  default_value: "false"
  description: Attach container's STDIN
  deprecated: false
  experimental: false
  experimentalcli: false
  kubernetes: false
  swarm: false
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-05-31 22:31:31 +02:00
.github Remove myself from CODEOWNERS 2018-03-26 13:39:03 -04:00
cli Mark checkpoint feature as Linux-only, and homogenize error messages 2018-05-31 22:25:06 +02:00
cmd/docker Mark checkpoint feature as Linux-only, and homogenize error messages 2018-05-31 22:25:06 +02:00
contrib/completion Minor fix: "stdin" instead of "stding" 2018-05-18 08:48:42 -05:00
dockerfiles Make e2e test image 2018-05-29 13:39:31 +02:00
docs YAML docs: add os_type property on flags and (sub)commands 2018-05-31 22:31:31 +02:00
e2e Add tests for Kubernetes 2018-05-29 15:26:07 +02:00
experimental fix a number of minor typos 2017-10-31 15:21:51 +05:00
internal/test Add tests for Kubernetes 2018-05-29 15:26:07 +02:00
kubernetes Make sure every composefiles sent to a v1beta1 endpoint are parsable 2018-05-09 13:17:25 -07:00
man Update document links and title. 2018-05-22 21:13:41 +08:00
opts Warn when using host-ip for published ports 2018-04-21 12:49:47 -07:00
scripts Make e2e test image 2018-05-29 13:39:31 +02:00
service/logs Convert assert.Check(t, is.Error()) to assert.Error 2018-03-06 16:00:28 -05:00
templates Convert assert.Check with 2018-03-06 15:43:53 -05:00
vendor Merge pull request #1023 from simonferquel/k8s-stack-services-filters 2018-05-24 19:56:33 +02:00
.dockerignore make go build and docker build operations faster 2017-04-27 15:06:57 -07:00
.gitignore Update gitignore 2017-09-27 16:45:35 +02:00
.mailmap Update AUTHORS and mailmap 2018-04-18 13:31:07 -07:00
AUTHORS Update AUTHORS and mailmap 2018-04-18 13:31:07 -07:00
CONTRIBUTING.md Add Contribution guidelines 2017-07-28 11:33:19 -07:00
Jenkinsfile Add a Jenkinsfile 2017-08-16 10:46:43 -04:00
LICENSE Add project files 2017-04-17 17:49:33 -04:00
MAINTAINERS Merge pull request #1013 from thaJeztah/update-authors 2018-04-18 13:46:30 -07:00
Makefile Fix vendor validation 2018-02-02 11:01:05 -08:00
NOTICE Add project files 2017-04-17 17:49:33 -04:00
README.md Add jenkins build status to readme 2017-09-15 15:08:28 +02:00
TESTING.md Add TESTING document. 2017-08-24 14:45:50 -04:00
VERSION Bump version to 18.06.0-dev 2018-05-02 12:11:23 +02:00
appveyor.yml Add appveyor setup to build and unit test 2018-03-07 18:14:10 +01:00
circle.yml Fix some build failures 2017-12-26 11:22:32 +01:00
codecov.yml Fix PR comments 2018-01-03 10:23:32 +01:00
docker.Makefile Make e2e test image 2018-05-29 13:39:31 +02:00
gometalinter.json Add support for kubernetes in docker cli 2017-12-26 11:22:32 +01:00
poule.yml Add github templates and initial poule configuration 2017-05-09 16:57:46 +02:00
vendor.conf Bump spf13/cobra to v0.0.3, spf13/pflag to v1.0.1 2018-05-19 02:51:33 +02:00

README.md

build status Build Status

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.