docs
docs copied to clipboard
Provide definitive example/description for "option types" that maps to cli help
Is this a docs issue?
- [X] My issue is about the documentation content or website
Type of issue
I can't find what I'm looking for
Description
When running docker * --help
commands options appear with a "type" next to them. For example here's what build shows
docker build --help
Usage: docker build [OPTIONS] PATH | URL | -
Build an image from a Dockerfile
Options:
--add-host list Add a custom host-to-IP mapping (host:ip)
--build-arg list Set build-time variables
--cache-from strings Images to consider as cache sources
--disable-content-trust Skip image verification (default true)
-f, --file string Name of the Dockerfile (Default is 'PATH/Dockerfile')
--iidfile string Write the image ID to the file
--isolation string Container isolation technology
--label list Set metadata for an image
--network string Set the networking mode for the RUN instructions during build (default "default")
--no-cache Do not use cache when building the image
-o, --output stringArray Output destination (format: type=local,dest=path)
--platform string Set platform if server is multi-platform capable
--progress string Set type of progress output (auto, plain, tty). Use plain to show container output (default "auto")
--pull Always attempt to pull a newer version of the image
-q, --quiet Suppress the build output and print image ID on success
--secret stringArray Secret file to expose to the build (only if BuildKit enabled): id=mysecret,src=/local/secret
--ssh stringArray SSH agent socket or keys to expose to the build (only if BuildKit enabled) (format: default|<id>[=<socket>|<key>[,<key>]])
-t, --tag list Name and optionally a tag in the 'name:tag' format
--target string Set the target build stage to build.
if I look at the -t, --tag list
, I'm referring to the list
portion.
When looking at this section of the docs on the website, It's not clear how to distinguish say stringArray
and list
and how to pass them via the cli
It would be nice if there was a section that mapped all the types to examples on how to pass them. For example maybe something like this idk
**type** | **example** |
list | --option value1 --option value2 |
stringArray | --some-option value1,vlaue2,value3 |
strings | ... |
Location
https://docs.docker.com/engine/reference/commandline/cli/#option-types
Suggestion
No response
side note, I also couldn't find this in the cli
itself; was looking for something like docker help topic
or something like that would explain which is why I went looking for this in the website. It would be extra cool if this disambiguation was available in the cli itself.
I don't want to spam issues which is why I didn't open up an issue on the cli repo regarding this, should I?
There hasn't been any activity on this issue for a long time.
If the problem is still relevant, mark the issue as fresh with a /remove-lifecycle stale
comment.
If not, this issue will be closed in 14 days. This helps our maintainers focus on the active issues.
Prevent issues from auto-closing with a /lifecycle frozen
comment.
/lifecycle stale
Closed issues are locked after 30 days of inactivity. This helps our team focus on active issues.
If you have found a problem that seems similar to this, please open a new issue.
/lifecycle locked