Commit Graph

4173 Commits

Author SHA1 Message Date
Sebastiaan van Stijn efd11bf69d
Bump docker/docker to cd35e4beee13a7c193e2a89008cd87d38fcd0161
Reverts changes in pkg/term related to `OPOST` that pulled in through;
3574e6a674

And reverted upstream in;
cd35e4beee

Full diff;
c8141a1fb1...cd35e4beee

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-08 16:27:49 +02:00
Sebastiaan van Stijn ab3ea637b6 Merge pull request #111 from keloyang/attach-restarting-check
Add a restarting check to runAttach
2017-06-08 12:53:15 +02:00
Vincent Demeester c944d20b1f Merge pull request #163 from vdemeester/export-convertservice
Update ConvertService for external usage 👼
2017-06-08 10:55:56 +02:00
Vincent Demeester 96dc07a8cf Update ConvertService for external usage 👼
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-06-08 10:44:05 +02:00
Shukui Yang 90f497302f Add a restarting check to runAttach
Signed-off-by: Shukui Yang <yangshukui@huawei.com>
2017-06-08 07:12:39 +08:00
Shukui Yang e8cc2cf760 Replace command.DockerCli to command.Cli in docker attach/exec command
Signed-off-by: Shukui Yang <yangshukui@huawei.com>
2017-06-08 07:03:52 +08:00
Nishant Totla f790e839fc
Change --no-resolve-image flag to --resolve-image string flag
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
2017-06-07 12:30:11 -07:00
Nishant Totla 9f1bea2657
Enable client side digest pinning for stack deploy
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
2017-06-07 12:30:11 -07:00
Kenfe-Mickaël Laventure 08cb0bddfd Merge pull request #162 from vdemeester/150-configs-fixes-on-old-daemon
Handle case of configs on old daemon
2017-06-07 12:18:32 -07:00
Misty Stanley-Jones b5d33c6e76 Clarify ability to attach multiple times
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
2017-06-07 09:40:43 -07:00
Aaron Lehmann 9d12d6fc87 Merge pull request #145 from dnephin/improve-compose-secrets-errors
Compose: Improve error messages when resource create/update fails
2017-06-07 18:51:10 +03:00
Daniel Nephin 230b9eaf1a Merge pull request #161 from vdemeester/update-codecov-threshold
Update codecov project threshold to 15%
2017-06-07 11:13:19 -04:00
Vincent Demeester cf5550c426
Handle case of configs on old daemon
If configs are declared for a service and pointing on an old
daemon, error out properly (instead of "page not found").

If there is no configs declared, don't call convertServiceConfigObjs
to avoid having an error.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-06-07 17:02:46 +02:00
Vincent Demeester a132733939
Update codecov project threshold to 15%
That way, the build will fail less.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-06-07 13:26:24 +02:00
Aaron Lehmann 583ed2e3be Merge pull request #155 from vdemeester/fix-and-update-vendor
Update vendoring of docker/docker
2017-06-07 14:25:57 +03:00
Daniel Nephin f75a44ffd8 Fix check-git-diff so that it fails on CI
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-06-06 15:06:34 -04:00
Sebastiaan van Stijn 51b00f966e Merge pull request #158 from tiborvass/fix-manpages-script
Fix manpages script
2017-06-06 10:44:58 +02:00
Tibor Vass dc81def89c fix manpages script
Signed-off-by: Tibor Vass <tibor@docker.com>
2017-06-06 05:00:10 +00:00
Vincent Demeester 44ac80881f
Update vendoring of docker/docker
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-06-06 00:23:21 +02:00
Tibor Vass ed5b663082 Merge pull request #154 from tiborvass/add-man-docs-scripts
Add scripts and targets for manpages and yamldocs
2017-06-05 13:20:56 -07:00
Tibor Vass ff615dbc4d Add scripts and targets for manpages and yamldocs
Signed-off-by: Tibor Vass <tibor@docker.com>
2017-06-05 19:10:44 +00:00
Tibor Vass d95fd2f38c Merge pull request #147 from tiborvass/import-man-docs-completion
Import man docs completion
2017-06-02 12:36:15 -07:00
Daniel Nephin d2976d599f Remove old manpage generation dockerfiles and glide config.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-06-02 12:00:23 -04:00
Daniel Nephin 3718833f2c Add unit tests for service/ps
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-06-02 11:29:19 -04:00
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
Sebastiaan van Stijn a0066a150b Merge pull request #143 from thaJeztah/remove-email-flag
Remove deprecated -e/--email flag from docker login
2017-06-02 08:56:07 +02:00
Tibor Vass d2cb97e76d Revert docs/yaml removal
This reverts commit 3e911ff825.
2017-06-02 00:25:19 +00:00
Tibor Vass ca8303e325 Import completion scripts, docs, and man pages from docker/docker 2017-06-02 00:17:20 +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 bc5fca913b docs: add missing cache-from man docs
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.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
Harald Albers 4c0d6698d1 Update bash completion for log driver options
Signed-off-by: Harald Albers <github@albersweb.de>
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
Harald Albers d8dfa04cae Add bash completion for new devicemapper storage options
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:11:05 +00:00
Harald Albers 95fcee5fc6 Add bash completion for `--health-start-period`
Signed-off-by: Harald Albers <github@albersweb.de>
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
Harald Albers 62d0309d24 bash completion for `stack deploy --prune`
Signed-off-by: Harald Albers <github@albersweb.de>
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
Philipp Gillé 4dcac12be0 Fix list of experimental features
- Remove duplicate entry
- Fix anchor in link

Signed-off-by: Philipp Gille <philipp.gille@gmail.com>
2017-06-02 00:11:04 +00:00