Commit Graph

1745 Commits (ff615dbc4d01b0115e4658ee1a0ed6809b5f88ae)

Author SHA1 Message Date
Daniel Nephin 875daf0130 Add missing dependencies to vendor, and fix generation imports
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-06-02 11:12:43 -04:00
Tibor Vass d2cb97e76d Revert docs/yaml removal
This reverts commit 3e911ff825.
2017-06-02 00:25:19 +00:00
Alessandro Boch cccd6379b7 Docs and manual changes
- for service create on node-local networks

Signed-off-by: Alessandro Boch <aboch@docker.com>
2017-06-02 00:11:05 +00:00
Josh Hawn a49573e5fb Update ContainerWait API
This patch adds the untilRemoved option to the ContainerWait API which
allows the client to wait until the container is not only exited but
also removed.

This patch also adds some more CLI integration tests for waiting for a
created container and waiting with the new --until-removed flag.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Handle detach sequence in CLI

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Update Container Wait Conditions

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Apply container wait changes to API 1.30

The set of changes to the containerWait API missed the cut for the
Docker 17.05 release (API version 1.29). This patch bumps the version
checks to use 1.30 instead.

This patch also makes a minor update to a testfile which was added to
the builder/dockerfile package.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Remove wait changes from CLI

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Address minor nits on wait changes

- Changed the name of the tty Proxy wrapper to `escapeProxy`
- Removed the unnecessary Error() method on container.State
- Fixes a typo in comment (repeated word)

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Use router.WithCancel in the containerWait handler

This handler previously added this functionality manually but now uses
the existing wrapper which does it for us.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Add WaitCondition constants to api/types/container

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Address more ContainerWait review comments

- Update ContainerWait backend interface to not return pointer values
  for container.StateStatus type.
- Updated container state's Wait() method comments to clarify that a
  context MUST be used for cancelling the request, setting timeouts,
  and to avoid goroutine leaks.
- Removed unnecessary buffering when making channels in the client's
  ContainerWait methods.
- Renamed result and error channels in client's ContainerWait methods
  to clarify that only a single result or error value would be sent
  on the channel.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Move container.WaitCondition type to separate file

... to avoid conflict with swagger-generated code for API response

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Address more ContainerWait review comments

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2017-06-02 00:11:05 +00:00
Ying Li e1cd83f28a Document the swarm root CA rotation CLI command.
Signed-off-by: Ying Li <ying.li@docker.com>
2017-06-02 00:11:05 +00:00
Noah Treuhaft 9810554494 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>
2017-06-02 00:11:05 +00:00
Ying Li 42ec86ae9b 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>
2017-06-02 00:11:05 +00:00
Tonis Tiigi d50472f52b docs: add docs for build —target
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-06-02 00:11:05 +00:00
Tonis Tiigi 48ba755c3b 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>
2017-06-02 00:11:05 +00:00
Daniel Nephin c6e78b9c5f Document arg before from
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-06-02 00:11:05 +00:00
Brian Goff d8e04f68d3 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>
2017-06-02 00:11:05 +00:00
Aaron Lehmann cf95e198c5 Update CLI docs and add opts/config.go
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-06-02 00:11:05 +00:00
John V. Martinez a316bc3895 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>
2017-06-02 00:11:05 +00:00
Sebastiaan van Stijn 6a767c1711 fix confusing description of stdout/stdin pipe
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-02 00:11:05 +00:00
Arnaud Porterie (icecrime) 3e911ff825 Remove cmd/docker and other directories in cli/ in accordance with the new Moby project scope
Starting with this commit, integration tests should no longer rely on
the docker cli, they should be API tests instead. For the existing tests
the scripts will use a frozen version of the docker cli with a
DOCKER_API_VERSION frozen to 1.30, which should ensure that the CI remains
green at all times.

To help contributors develop and test manually with a modified docker
cli, this commit also adds a DOCKER_CLI_PATH environment variable to the
Makefile. This allows to set the path of a custom cli that will be
available inside the development container and used to run the
integration tests.

Signed-off-by: Arnaud Porterie (icecrime) <arnaud.porterie@docker.com>
Signed-off-by: Tibor Vass <tibor@docker.com>
2017-06-02 00:11:04 +00:00
Ian Campbell 0808cf04cb 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>
2017-06-02 00:11:04 +00:00
Brian Goff 20bcf49fb6 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>
2017-06-02 00:11:04 +00:00
Brian Goff 297dc42dff 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>
2017-06-02 00:11:04 +00:00
Gary Schaetz 80a7f5dec7 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>
2017-06-02 00:11:04 +00:00
MichaelSpets 824c665811 Add doc for system events and events[Fix #32748]
Signed-off-by: MichaelSpets <michael_spets@hotmail.com>
2017-06-02 00:11:04 +00:00
David Sheets 24b6f3cd6e docs/dockerd: correct authz plugin chain semantics
Signed-off-by: David Sheets <dsheets@docker.com>
2017-06-02 00:11:04 +00:00
yuexiao-wang 079bc9c7aa fix some typos for plugin
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2017-06-02 00:11:04 +00:00
Sebastiaan van Stijn 7480fcad48 Deprecate "asynchronous" service create and service update
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-02 00:11:04 +00:00
Denis Defreyne d24201d734 Clarify --env-file usage with names without values
Signed-off-by: Denis Defreyne <denis@soundcloud.com>
2017-06-02 00:11:04 +00:00
Michael Friis 542af38ce5 fix typo in plugins_logging.md
Signed-off-by: Michael Friis <friism@gmail.com>
2017-06-02 00:11:04 +00:00
Dong Chen 1fa8221743 do not allow duration less than 1 ms in healthcheck parameters
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
2017-06-02 00:11:04 +00:00
Harald Albers 3e646fed80 Add bash completion for `system df --format`
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:11:04 +00:00
yuexiao-wang 852a861b8e fix errors in config
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2017-06-02 00:11:04 +00:00
Flavio Crisciani 137a190a79 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>
2017-06-02 00:11:04 +00:00
Julien Kassar ba5a2dc787 Update legacy_plugins.md to include HBM authz plugin
Signed-off-by: Julien Kassar <github@kassisol.com>
2017-06-02 00:11:04 +00:00
Boaz Shuster 5be9e57c51 Add format to docker stack ls
Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
2017-06-02 00:11:03 +00:00
Julien Maitrehenry 33fecab492 Clarify where the RUN command runs from
Also, chained/quoted shell does not work

Signed-off-by: Julien Maitrehenry <julien.maitrehenry@me.com>
2017-06-02 00:11:03 +00:00
Antonio Murdaca 4977ec1cca remove --init-path from client
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-06-02 00:11:03 +00:00
Alvin Deng 65cf6dd611 Update dockerd.md
Signed-off-by: Alvin Deng <alvin.q.deng@utexas.edu>
2017-06-02 00:11:03 +00:00
Alvin Deng d2295d58b2 Add examples of storage-opts and log-opts for the daemon
Signed-off-by: Alvin Deng <alvin.q.deng@utexas.edu>
2017-06-02 00:11:03 +00:00
Sebastiaan van Stijn 275d8ab8de 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>
2017-06-02 00:11:03 +00:00
Sebastiaan van Stijn 8ca20aee9f Fix markdown indentation level
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-02 00:11:03 +00:00
Jeremy Chambers aa124aee73 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
2017-06-02 00:11:03 +00:00
Boaz Shuster 9e2467d474 Add format to the docker system df command
Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
2017-06-02 00:11:03 +00:00
Yong Tang 40bb4a3b0e 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>
2017-06-02 00:11:03 +00:00
yuexiao-wang fcdc75de3e Fix inconsisticy for service logs
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2017-06-02 00:11:03 +00:00
Joao Fernandes 66cfdff646 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>
2017-06-02 00:11:03 +00:00
Daniel Nephin 71b0f91129 Add docs for reading Dockerfile from stdin.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-06-02 00:11:03 +00:00
Daniel Nephin 6e40868ade 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>
2017-06-02 00:11:03 +00:00
Aaron Lehmann 91ca194713 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>
2017-06-02 00:11:03 +00:00
Drew Erny 279bbbab27 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>
2017-06-02 00:11:02 +00:00
Alfred Landrum 4b8712eacb Let graphdrivers declare diff stream fidelity
This allows graphdrivers to declare that they can reproduce the original
diff stream for a layer. If they do so, the layer store will not use
tar-split processing, but will still verify the digest on layer export.
This makes it easier to experiment with non-default diff formats.

Signed-off-by: Alfred Landrum <alfred.landrum@docker.com>
2017-06-02 00:11:02 +00:00
Arash Deshmeh 98bcbcf774 stack rm should accept multiple arguments
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
2017-06-02 00:11:02 +00:00
Vincent Demeester 0dc44cd964 Merge pull request #31848 from thaJeztah/17.04.0-changelog-updates
[17.04.x] deprecation and changelog updates
(cherry picked from commit f15f5937514c386ace40a43441dddc28337ca12d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-02 00:11:02 +00:00
Brian Goff 114cc6ca3a Implement plugins for logging drivers
Logging plugins use the same HTTP interface as other plugins for basic
command operations meanwhile actual logging operations are handled (on
Unix) via a fifo.

The plugin interface looks like so:

```go
type loggingPlugin interface {
  StartLogging(fifoPath string, loggingContext Context) error
  StopLogging(fifoPath)
```

This means a plugin must implement `LoggingDriver.StartLogging` and
`LoggingDriver.StopLogging` endpoints and be able to consume the passed
in fifo.

Logs are sent via stream encoder to the fifo encoded with protobuf.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-06-02 00:11:02 +00:00