Commit Graph

978 Commits

Author SHA1 Message Date
8fabd69470 Add daemon option to push foreign layers
The --allow-nondistributable-artifacts daemon option specifies
registries to which foreign layers should be pushed.  (By default,
foreign layers are not pushed to registries.)

Additionally, to make this option effective, foreign layers are now
pulled from the registry if possible, falling back to the URLs in the
image manifest otherwise.

This option is useful when pushing images containing foreign layers to a
registry on an air-gapped network so hosts on that network can pull the
images without connecting to another server.

Signed-off-by: Noah Treuhaft <noah.treuhaft@docker.com>
Upstream-commit: 9810554494
Component: cli
2017-06-02 00:11:05 +00:00
1d4d33c8f3 Update the CLI docs to display whether a root rotation is in progress
when viewing system info, and TLS info when displaying node info.

Signed-off-by: Ying Li <ying.li@docker.com>
Upstream-commit: 42ec86ae9b
Component: cli
2017-06-02 00:11:05 +00:00
e28d94d143 docs: add docs for build —target
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: d50472f52b
Component: cli
2017-06-02 00:11:05 +00:00
0e345f3249 Allow checking out any ref in gitutils
Also changes so that shallow fetch is performed
even when a specific ref is specified.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 48ba755c3b
Component: cli
2017-06-02 00:11:05 +00:00
57eca1a73e Document arg before from
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: c6e78b9c5f
Component: cli
2017-06-02 00:11:05 +00:00
c564ad3f69 Add support for metrics plugins
Allows for a plugin type that can be used to scrape metrics.
This is useful because metrics are not neccessarily at a standard
location... `--metrics-addr` must be set, and must currently be a TCP
socket.
Even if metrics are done via a unix socket, there's no guarentee where
the socket may be located on the system, making bind-mounting such a
socket into a container difficult (and racey, failure-prone on daemon
restart).

Metrics plugins side-step this issue by always listening on a unix
socket and then bind-mounting that into a known path in the plugin
container.

Note there has been similar work in the past (and ultimately punted at
the time) for consistent access to the Docker API from within a
container.

Why not add metrics to the Docker API and just provide a plugin with
access to the Docker API? Certainly this can be useful, but gives a lot
of control/access to a plugin that may only need the metrics. We can
look at supporting API plugins separately for this reason.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: d8e04f68d3
Component: cli
2017-06-02 00:11:05 +00:00
c5eee882f2 Update CLI docs and add opts/config.go
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: cf95e198c5
Component: cli
2017-06-02 00:11:05 +00:00
a7a84c14b2 Improve documentation on the -e flag to the 'run' cli command. The ability to import the current vale of an environment variable by simply naming the variable didn't seem to be documented anywhere. (see opts/env.go)
Signed-off-by: John V. Martinez <jvmatl@gmail.com>
Upstream-commit: a316bc3895
Component: cli
2017-06-02 00:11:05 +00:00
61c68f6c04 fix confusing description of stdout/stdin pipe
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 6a767c1711
Component: cli
2017-06-02 00:11:05 +00:00
52384a103d Add docker build --iidfile=FILE
This is synonymous with `docker run --cidfile=FILE` and writes the digest of
the newly built image to the named file. This is intended to be used by build
systems which want to avoid tagging (perhaps because they are in CI or
otherwise want to avoid fixed names which can clash) by enabling e.g. Makefile
constructs like:

    image.id: Dockerfile
    	docker build --iidfile=image.id .

    do-some-more-stuff: image.id
    	do-stuff-with <image.id

Currently the only way to achieve this is to use `docker build -q` and capture
the stdout, but at the expense of losing the build output.

In non-silent mode (without `-q`) with API >= v1.29 the caller will now see a
`JSONMessage` with the `Aux` field containing a `types.BuildResult` in the
output stream for each image/layer produced during the build, with the final
one being the end product.  Having all of the intermediate images might be
interesting in some cases.

In silent mode (with `-q`) there is no change, on success the only output will
be the resulting image digest as it was previosuly.

There was no wrapper to just output an Aux section without enclosing it in a
Progress, so add one here.

Added some tests to integration cli tests.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
Upstream-commit: 0808cf04cb
Component: cli
2017-06-02 00:11:04 +00:00
da440c7a29 Add option to auto-configure blkdev for devmapper
Instead of forcing users to manually configure a block device to use
with devmapper, this gives the user the option to let the devmapper
driver configure a device for them.

Adds several new options to the devmapper storage-opts:

- dm.directlvm_device="" - path to the block device to configure for
  direct-lvm
- dm.thinp_percent=95 - sets the percentage of space to use for
  storage from the passed in block device
- dm.thinp_metapercent=1 - sets the percentage of space to for metadata
  storage from the passed in block device
- dm.thinp_autoextend_threshold=80 - sets the threshold for when `lvm`
  should automatically extend the thin pool as a percentage of the total
  storage space
- dm.thinp_autoextend_percent=20 - sets the percentage to increase the
  thin pool by when an autoextend is triggered.

Defaults are taken from
[here](https://docs.docker.com/engine/userguide/storagedriver/device-mapper-driver/#/configure-direct-lvm-mode-for-production)

The only option that is required is `dm.directlvm_device` for docker to
set everything up.

Changes to these settings are not currently supported and will error
out.
Future work could support allowing changes to these values.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 20bcf49fb6
Component: cli
2017-06-02 00:11:04 +00:00
93047d501f Add no-new-privileg flag
The daemon config for defaulting to no-new-privileges for containers was
added in d7fda019bb7e24f42f8ae1ddecb3fd52df3c48bf, but somehow we
managed to omit the flag itself, but also documented the flag.
This just adds the actual flag.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 297dc42dff
Component: cli
2017-06-02 00:11:04 +00:00
1d760fc60d Update attach.md
added some clarification around why attach can appear hung to some.  issue #1456 on docs

Signed-off-by: gary schaetz <gary@schaetzkc.com>

Updated the documentation to reflect what happens when you use a fragment in
the docker build url parameter.

Signed-off-by: Gary Schaetz <gary@schaetzkc.com>

added markup for commands

Signed-off-by: Gary Schaetz <gary@schaetzkc.com>
Upstream-commit: 80a7f5dec7
Component: cli
2017-06-02 00:11:04 +00:00
69b02c5a33 Add doc for system events and events[Fix #32748]
Signed-off-by: MichaelSpets <michael_spets@hotmail.com>
Upstream-commit: 824c665811
Component: cli
2017-06-02 00:11:04 +00:00
d8cd6f9925 docs/dockerd: correct authz plugin chain semantics
Signed-off-by: David Sheets <dsheets@docker.com>
Upstream-commit: 24b6f3cd6e
Component: cli
2017-06-02 00:11:04 +00:00
b2bd413ffa fix some typos for plugin
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 079bc9c7aa
Component: cli
2017-06-02 00:11:04 +00:00
11fe4742fb Clarify --env-file usage with names without values
Signed-off-by: Denis Defreyne <denis@soundcloud.com>
Upstream-commit: d24201d734
Component: cli
2017-06-02 00:11:04 +00:00
f54540bc34 do not allow duration less than 1 ms in healthcheck parameters
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
Upstream-commit: 1fa8221743
Component: cli
2017-06-02 00:11:04 +00:00
aa463e4b97 Add bash completion for system df --format
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 3e646fed80
Component: cli
2017-06-02 00:11:04 +00:00
81790c00c8 Inroduce SWARM --data-path-addr flag
This new flag will allow the configuration of an interface that
can be used for data path traffic to be isolated from control
plane traffic. This flag is simply percolated down to libnetwork
and will be used by all the global scope drivers (today overlay)

Negative test added for invalid flag arguments

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
Upstream-commit: 137a190a79
Component: cli
2017-06-02 00:11:04 +00:00
4dee681848 Add format to docker stack ls
Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Upstream-commit: 5be9e57c51
Component: cli
2017-06-02 00:11:03 +00:00
3412b213bc Clarify where the RUN command runs from
Also, chained/quoted shell does not work

Signed-off-by: Julien Maitrehenry <julien.maitrehenry@me.com>
Upstream-commit: 33fecab492
Component: cli
2017-06-02 00:11:03 +00:00
f495b2a68e remove --init-path from client
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 4977ec1cca
Component: cli
2017-06-02 00:11:03 +00:00
7802f53667 Update dockerd.md
Signed-off-by: Alvin Deng <alvin.q.deng@utexas.edu>
Upstream-commit: 65cf6dd611
Component: cli
2017-06-02 00:11:03 +00:00
2261e89bcf Add examples of storage-opts and log-opts for the daemon
Signed-off-by: Alvin Deng <alvin.q.deng@utexas.edu>
Upstream-commit: d2295d58b2
Component: cli
2017-06-02 00:11:03 +00:00
7e9087ff05 Minor fixups for history CLI reference
This does some minor fix-ups in the CLI reference
for "history", and copies the formattting section to
the man-pages.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 275d8ab8de
Component: cli
2017-06-02 00:11:03 +00:00
de68965d62 Fix markdown indentation level
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 8ca20aee9f
Component: cli
2017-06-02 00:11:03 +00:00
28a0a6d2c7 Implements --format option for docker history command by creating a formatter
Signed-off-by: Jeremy Chambers <jeremy@thehipbot.com>

Adds to history documentation for --format

Signed-off-by: Jeremy Chambers <jeremy@thehipbot.com>

Adds MarshalJSON to historyContext for {{json .}} format

Signed-off-by: Jeremy Chambers <jeremy@thehipbot.com>

Adds back the --human option to history command

Signed-off-by: Jeremy Chambers <jeremy@thehipbot.com>

Cleans up formatter around --human option for history, Adds integration test for --format option of history

Signed-off-by: Jeremy Chambers <jeremy@thehipbot.com>

Adds test for history formatter checking full table results, Runs go fmt on touched files

Signed-off-by: Jeremy Chambers <jeremy@thehipbot.com>

Fixes lint errors in formatter/history

Signed-off-by: Jeremy Chambers <jeremy@thehipbot.com>

Runs go fmt on cli/command/formatter/history.go

Signed-off-by: Jeremy Chambers <jeremy@thehipbot.com>

sRemoves integration test for --format option of history

Merges Created and CreatedSince in docker history formatter, Updates docs and tests
Upstream-commit: aa124aee73
Component: cli
2017-06-02 00:11:03 +00:00
8530cbe276 Add format to the docker system df command
Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Upstream-commit: 9e2467d474
Component: cli
2017-06-02 00:11:03 +00:00
fb921da04c Update docs of label filter for docker system prune
This fix updates docs of `label` filter for `docker system prune`.

This fix is related to #30740 and #29999, and specifically to comment
https://github.com/docker/docker/pull/30740#issuecomment-293012957.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 40bb4a3b0e
Component: cli
2017-06-02 00:11:03 +00:00
797a7f455c Fix inconsisticy for service logs
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: fcdc75de3e
Component: cli
2017-06-02 00:11:03 +00:00
a0c49cf7f4 Clean docker run -e reference docs
Simplified the docs on how to set environment variables in a
container. Makes it clear that you have three options, and how
to use them.

Signed-off-by: Joao Fernandes <joao.fernandes@docker.com>
Upstream-commit: 66cfdff646
Component: cli
2017-06-02 00:11:03 +00:00
256568f159 Add docs for reading Dockerfile from stdin.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 71b0f91129
Component: cli
2017-06-02 00:11:03 +00:00
9e2302a5ae Add Dockerfile reference docs for using ARG in FROM
Also fixed some examples of using `docker build` to clarify that the
positional argument is a directory, not a file.

Also fixed some terminology. Dockerfiles contain instructions, not directives or
commands.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 6e40868ade
Component: cli
2017-06-02 00:11:03 +00:00
af4c3ad361 Make the CLI show defaults from the swarmkit defaults package
If no fields related to an update config or restart policy are
specified, these structs should not be created as part of the service,
to avoid hardcoding the current defaults.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 91ca194713
Component: cli
2017-06-02 00:11:03 +00:00
c040c93b7d Remove experimental from service logs
Service logs API is now stable. Service logs now support all features,
except retrieving details provided to the log driver.

Signed-off-by: Drew Erny <drew.erny@docker.com>
Upstream-commit: 279bbbab27
Component: cli
2017-06-02 00:11:02 +00:00
35af017374 stack rm should accept multiple arguments
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: 98bcbcf774
Component: cli
2017-06-02 00:11:02 +00:00
963782f121 Add --cpus support for docker update
This fix tries to address the issue raised in 31032 where it was
not possible to specify `--cpus` for `docker update`.

This fix adds `--cpus` support for `docker update`. In case both
`--cpus` and `--cpu-period/--cpu-quota` have been specified,
an error will be returned.

Related docs has been updated.

Integration tests have been added.

This fix fixes 31032.

This fix is related to 27921, 27958.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: f2933f6ea6
Component: cli
2017-06-02 00:11:02 +00:00
c3b0801303 Added word to documentation
Improved documentation by adding word for better sentence structure.

Signed-off-by: Mike Casas <mkcsas0@gmail.com>
Upstream-commit: 8abc802de9
Component: cli
2017-06-02 00:11:02 +00:00
c16846922d Add docs for named build stages
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 29dd51d2a8
Component: cli
2017-06-02 00:11:02 +00:00
cb45fef45d cli: Allow service's networks to be updated
Resolve networks IDs on the client side.

Avoid filling in deprecated Spec.Networks field.

Sort networks in the TaskSpec for update stability.

Add an integration test for changing service networks.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: fc6428390a
Component: cli
2017-06-02 00:11:02 +00:00
91733928a1 clarify docker plugin set docs
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
Upstream-commit: 051ff3b303
Component: cli
2017-06-02 00:11:02 +00:00
bf4beaf856 Add support for update order
This parameter controls the order of operations when rolling out an
update task. Either the old task is stopped before starting the new one,
or the new task is started first, and the running tasks will briefly
overlap.

This commit adds Rollout to the API, and --update-order / --rollback-order
flags to the CLI.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: e434a91221
Component: cli
2017-06-02 00:11:02 +00:00
429d548d41 Added start period option to health check.
Signed-off-by: Elias Faxö <elias.faxo@gmail.com>
Upstream-commit: c5071b94da
Component: cli
2017-06-02 00:11:02 +00:00
150b832bdf cli: add --mount to docker run
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 6103806802
Component: cli
2017-06-02 00:11:02 +00:00
3139e744d9 Edits to CLI reference
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: 95c05a53c6
Component: cli
2017-06-02 00:11:01 +00:00
f46fcd68d4 Add hidden placeholder of .Self for docker node ls --format
This commit adds a hidden placeholder of `.Self` for
`docker node ls --format` so that if the node is the same
as the current docker daemon, then a `*` is outputed.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 45f80dccb0
Component: cli
2017-06-02 00:11:01 +00:00
b36d931653 Add --format for docker node ls
This fix tries to address the comment https://github.com/docker/docker/pull/30376#discussion_r97465334
where it was not possible to specify `--format` for `docker node ls`. The `--format` flag
is a quite useful flag that could be used in many places such as completion.

This fix implements `--format` for `docker node ls` and add `nodesFormat` in config.json
so that it is possible to specify the output when `docker node ls` is invoked.

Related documentations have been updated.

A set of unit tests have been added.

This fix is related to #30376.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 477ec9bfdd
Component: cli
2017-06-02 00:11:01 +00:00
b8a1f0d4a7 Add PORTS field for docker service ls (ingress)
This fix is related to 30232 wherw `docker service ls`
does not show `PORTS` information like `docker service ps`.

This fix adds `PORTS` fields for services that publish
ports in ingress mode.

Additional unit tests cases have been updated.

This fix is related to 30232.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 04afeb636e
Component: cli
2017-06-02 00:11:01 +00:00
6d717fcaf7 fix documentation error: volume-opt in service create
Signed-off-by: pacoxu<paco.xu@daocloud.io>
Signed-off-by: pacoxu <paco.xu@daocloud.io>
Upstream-commit: 764c84342d
Component: cli
2017-06-02 00:11:01 +00:00