Commit Graph

667 Commits

Author SHA1 Message Date
Anusha Ragunathan 752a9a7c56 Add HTTP client timeout.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-11-21 13:11:40 -08:00
Vincent Demeester 2d7ef04a57 Merge pull request #28556 from ehazlett/container-secret-store
Fix target reference secrets and container secret store
2016-11-21 21:40:01 +01:00
Daniel Nephin e1b5bdd768 Move docker stack out of experimental
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-11-21 15:30:25 -05:00
Vincent Demeester 2638cd6f3d Do not panic if network is nil
network is `nil` if the following case:

```
services:
  foo:
    image: nginx
    networks:
      mynetwork:
```

It's a valid compose so we should not panic.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-11-21 17:59:29 +01:00
Vincent Demeester 89703a0196 Merge pull request #28539 from nishanttotla/pin-image-digest-ux
Suppressing digest for docker service ls/ps
2016-11-21 14:06:37 +01:00
Vincent Demeester 4e343ae989 Merge pull request #28294 from vdemeester/compose-swarm-healthcheck
Add support for healthcheck in compose to swarm
2016-11-21 10:28:37 +01:00
Antonio Murdaca 123d33d81d api: types: keep info.SecurityOptions a string slice
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-11-19 13:21:16 +01:00
Sebastiaan van Stijn 82804cc8e5 swap position of "host" and "ip"
the service definition uses the format as defined
in  http://man7.org/linux/man-pages/man5/hosts.5.html
(IP_address canonical_hostname [aliases...])

This format is the _reverse_ of the format used in
the container API.

Commit f32869d956eb175f88fd0b16992d2377d8eae79c
inadvertently used the incorrect order.

This fixes the order, and correctly sets it to;

    IP-Address hostname

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-11-18 22:04:27 +01:00
Nishant Totla 5f1209bf4b Suppressing digest for docker service ls/ps
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
2016-11-18 09:39:34 -08:00
Aaron Lehmann b866fa77f4 Return warnings from service create and service update when digest pinning fails
Modify the service update and create APIs to return optional warning
messages as part of the response. Populate these messages with an
informative reason when digest resolution fails.

This is a small API change, but significantly improves the UX. The user
can now get immediate feedback when they've specified a nonexistent
image or unreachable registry.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-11-18 09:31:31 -08:00
Daniel Nephin c682f10a8f Default parallelism to 1.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-11-18 16:17:08 +01:00
Vincent Demeester e21f4f9996 Add support for healthcheck in composefile v3
`docker stack deploy` now supports a composefile v3 format that have a
healthcheck.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-11-18 15:09:13 +01:00
Vincent Demeester dd8712c634 Merge pull request #28354 from ripcurld00d/tag_creation
Change the docker-tag usage text to be clearer
2016-11-18 13:02:40 +01:00
Boaz Shuster cc36bf62ef Change the docker-tag usage text to be clearer
Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
2016-11-18 10:34:02 +02:00
Michael Crosby e59facceb7 Merge pull request #28347 from yongtang/28339-ignore-unkwnon-field-template
Use `map[string]bool` for `preProcessor` to ignore unknown fields
2016-11-17 15:13:02 -08:00
Tõnis Tiigi 4e4b58fbcb Merge pull request #28554 from vieux/showhelp
refactor help func in CLI
2016-11-17 14:27:26 -08:00
Evan Hazlett bc542f365c do not force target type for secret references
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

use secret store interface instead of embedded secret data into container

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2016-11-17 15:49:02 -05:00
Brian Goff a7987ef105 Merge pull request #28538 from yongtang/11162016-Log-Logf-fix
Fix several issues with `go vet` and `gofmt -s`
2016-11-17 15:21:22 -05:00
Victor Vieux 55908f8a82 refactor help func in CLI
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-17 10:54:10 -08:00
Yong Tang d691bce8c9 Fix several issues with `go vet` and `go fmt`
For some reason, `go vet` and `go fmt` validate does not capture
several issues.

The following was the output of `go vet`:
```
ubuntu@ubuntu:~/docker$ go vet ./... 2>&1 | grep -v ^vendor | grep -v '^exit status 1$'
cli/command/formatter/container_test.go:393: possible formatting directive in Log call
volume/volume_test.go:257: arg mp.RW for printf verb %s of wrong type: bool
```

The following was the output of `go fmt -s`:
```
ubuntu@ubuntu:~/docker$ gofmt -s -l . | grep -v ^vendor
cli/command/stack/list.go
daemon/commit.go
```

Fixed above issues with `go vet` and `go fmt -s`

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-11-17 06:31:28 -08:00
Yong Tang 4488d9f9fb Fix crash caused by `docker service inspect --pretty`
This fix tries to fix the crash caused by `docker service inspect --pretty`,
by performing necessary nil pointer check.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-11-16 17:26:03 -08:00
Yong Tang 3c56459801 Use `map[string]bool` for `preProcessor` to ignore unknwon field
This fix is an attempt to address the issue raised in 28339. In
`docker ps`, the formatter needs to expose all fields of `types.Container`
to `preProcessor` so that template could be executed.

This direct exposing is unreliable and could cause issues as user may incorrectly
assume all fields in `types.Container` will be available for templating.

However, the purpose of `preProcessor` is to only find out if `.Size`
is defined (so that opts.size could be set accordingly).

This fix defines `preProcessor` as `map[string]bool` with a func `Size()`.
In this way, any unknown fields will be ignored.

This fix adds several test cases to the existing `TestBuildContainerListOptions`.

This fix fixes 28339.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-11-16 13:23:47 -08:00
Sebastiaan van Stijn 91aed2e673 Merge pull request #28272 from Microsoft/jjh/sequentialscan2
Windows: Perf: Use sequential file access
2016-11-16 00:47:19 +01:00
Sebastiaan van Stijn 66d50e5695 Merge pull request #26868 from Microsoft/jjh/deprecateemail
1.14 deprecation: email from login
2016-11-15 13:08:05 +01:00
John Howard 5723c85b1d Windows: Use sequential file access
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-11-14 17:41:52 -08:00
Victor Vieux dc2eeb6456 Merge pull request #28340 from cpuguy83/28337_fix_template_opts_ps
Fix issue with missing fields for `ps` template
2016-11-14 14:25:01 -08:00
Anusha Ragunathan f1598f8b82 Add docs for plugin push
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-11-14 09:10:21 -08:00
Brian Goff d3169abc3b Fix issue with missing fields for `ps` template
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-11-12 11:23:21 -05:00
yupeng 0f6af2074c context.Context should be the first parameter of a function
Signed-off-by: yupeng <yu.peng36@zte.com.cn>
2016-11-12 14:14:34 +08:00
Aaron Lehmann 7e7c4eefa4 cli: Add valid suffixes for remaining duration options
A recent PR added `(ns|us|ms|s|m|h)` to the descriptions of some
duration options, but not all. Add it to the remaining options for
consistency.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-11-11 17:44:42 -08:00
John Howard 4088f3bcff Planned 1.13 deprecation: email from login
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-11-11 17:32:46 -08:00
Vincent Demeester 827b121154 Merge pull request #28306 from ehazlett/service-create-no-secrets
only check secrets for service create if requested
2016-11-11 20:58:40 +01:00
Victor Vieux 460a7e213c Merge pull request #28042 from yongtang/28018-docker-info-swarm-managers
Add information for `Manager Addresses` in the output of `docker info`
2016-11-11 09:30:01 -08:00
Brian Goff 356ff43768 Merge pull request #27872 from vdemeester/images-filter-filters
Add reference filter and deprecated filter param…
2016-11-11 11:24:19 -05:00
Sebastiaan van Stijn 57da27f76c Merge pull request #28297 from vdemeester/compose-swarm-openstdin
Add support for stdin_open in compose to swarm
2016-11-11 17:09:04 +01:00
Yong Tang cd71257cfd Add information for `Manager Addresses` in the output of `docker info`
As is specified in 28018, it would be useful to know the manager's addresses
even in a worker node. This is especially useful when there are many
worker nodes in a big cluster.

The information is available in `info.Swarm.RemoteManagers`.

This fix add the information of `Manager Addresses` to the output
of `docker info`, to explicitly show it.

A test has been added for this fix.

This fix fixes 28018.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-11-11 07:35:32 -08:00
Evan Hazlett 885c5f1747 only check secrets for service create if requested
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2016-11-11 10:07:24 -05:00
Vincent Demeester 3c61af0f76 Add reference filter and deprecated filter param…
… for `docker images`.

This deprecates the `filter` param for the `/images` endpoint and make a
new filter called `reference` to replace it. It does change the CLI
side (still possible to do `docker images busybox:musl`) but changes the
cli code to use the filter instead (so that `docker images --filter
busybox:musl` and `docker images busybox:musl` act the same).

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-11-11 15:34:01 +01:00
Vincent Demeester 84a795bf05 Add support for extra_hosts in composefile v3
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-11-11 15:20:02 +01:00
Vincent Demeester f24ff647e1 Add support for stdin_open in composefile v3
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-11-11 15:19:00 +01:00
Vincent Demeester 356421b7da Add support for tty in composefile v3
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-11-11 11:27:21 +01:00
Victor Vieux 19c8941f2f Merge pull request #27955 from mlaventure/runc-docker-info
Add external binaries version to docker info
2016-11-10 21:27:14 -08:00
Tõnis Tiigi 795e487513 Merge pull request #28235 from dmcgowan/fix-registry-authorization-errors
Fix registry authorization errors
2016-11-10 19:39:28 -08:00
Jana Radhakrishnan 148dc157f6 Add support for host port PublishMode in services
Add api/cli support for adding host port PublishMode in services.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-11-10 18:07:55 -08:00
Victor Vieux 7d89ba2d9d Merge pull request #27998 from dnephin/compose-on-swarm
Support `docker stack deploy` from a Compose file
2016-11-10 17:59:57 -08:00
Lei Jitang 005a3037de Merge pull request #28231 from yuexiao-wang/container-exec
Remove redundant parameter and fix typos
2016-11-11 09:55:42 +08:00
Derek McGowan 43bcd982cd Update for distribution vendor
Handle updates to reference package.
Updates for refactoring of challenge manager.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2016-11-10 17:34:12 -08:00
Victor Vieux 63167f17b0 Merge pull request #28226 from vieux/exit_exp_plugin
move plugins out of experimental
2016-11-10 17:30:54 -08:00
Victor Vieux 32beb80f99 Merge pull request #28031 from yongtang/27902-extra-hosts
Add flag `--host` to `service create` and `--host-add/rm` to `service update`
2016-11-10 16:55:29 -08:00
Victor Vieux f5cea67e33 move plugins out of experimental
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-11-10 15:51:32 -08:00
Andrea Luzzardi 79e1fd01ce Merge pull request #28089 from aluzzardi/service-logs
service logs
2016-11-10 15:13:41 -08:00
Victor Vieux d04c77bdae Merge pull request #28253 from aaronlehmann/arg-descriptions
cli: Change autolock flag description
2016-11-10 13:59:46 -08:00
Andrea Luzzardi b059cf5286 cli: docker service logs support
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2016-11-10 13:46:02 -08:00
Michael Crosby 6bf79deab5 Merge pull request #27797 from vdemeester/stats-format-names-support
Add support for Names and ID in stats format
2016-11-10 13:26:00 -08:00
Daniel Nephin cb1783590c Implement ipamconfig.subnet and be more explicit about restart policy always.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-11-10 16:22:31 -05:00
Aaron Lehmann fd5673eeb9 cli: Change autolock flag description
This change incorporates feedback from @thaJeztah in the PR that added
the autolock flag. It changes the descriptions to be different for
"swarm init" and "swarm update" so that the boolean nature so that the
purpose of the flag in both contexts is clearer.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-11-10 12:05:19 -08:00
Yong Tang 6f3ee9c568 Add flag `--host` to `service create` and `--host-add/--host-rm` to `service update`
This fix tries to address 27902 by adding a flag `--host`
to `docker service create` and `--host-add/--host-rm` to
`docker service update`, so that it is possible to
specify extra `host:ip` settings in `/etc/hosts`.

This fix adds `Hosts` in swarmkit's `ContainerSpec` so that it
is possible to specify extra hosts during service creation.

Related docs has been updated.

An integration test has been added.

This fix fixes 27902.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-11-10 10:20:24 -08:00
Sebastiaan van Stijn 82c10dd9f9 Merge pull request #28243 from andrewhsu/change-context
use "golang.org/x/net/context" instead of "context"
2016-11-10 19:13:56 +01:00
Tibor Vass fb0e903122 Merge pull request #28148 from vieux/rename_plugin_manifest
rename plugin manifest
2016-11-10 09:47:15 -08:00
Daniel Nephin 0333117b88 Handle bind options and volume options
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-11-10 12:37:17 -05:00
Daniel Nephin 458ffcd2e6 Restore stack deploy integration test with dab
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-11-10 11:28:19 -05:00
Aanand Prasad 791b687848 Reinstate --bundle-file argument to 'docker deploy'
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-11-10 11:28:18 -05:00
Daniel Nephin d05510d954 Add integration test for stack deploy.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-11-10 11:28:18 -05:00
Daniel Nephin 3875355a3e Remove bundlefile
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-11-10 11:28:18 -05:00
Daniel Nephin ef845be6a5 Remove duplication of name mangling.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-11-10 11:28:18 -05:00
Daniel Nephin d89cb4c62f Always use a default network if no other networks are set.
also add network labels.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-11-10 11:28:18 -05:00
Daniel Nephin ae8f001829 Send warnings to stderr.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-11-10 11:28:18 -05:00
Aanand Prasad 25c93d4ebb Default to replicated mode
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-11-10 11:28:18 -05:00
Aanand Prasad dfab8f2bd4 Handle unsupported, deprecated and forbidden properties
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-11-10 11:28:18 -05:00
Daniel Nephin e1b96b6447 Add swarmkit fields to stack service.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-11-10 11:28:18 -05:00
Aanand Prasad a9fc9b60fe Add support for service-level 'volumes' key
Support volume driver + options
Support external volumes
Support hostname in Compose file

Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-11-10 11:28:18 -05:00
Daniel Nephin f702b722d8 Convert deploy to use a compose-file.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-11-10 11:28:18 -05:00
Andrew Hsu dc32cb6c77 use "golang.org/x/net/context" instead of "context"
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2016-11-10 08:23:19 -08:00
Sebastiaan van Stijn c5fbdc8572 Merge pull request #28186 from yongtang/27567-follow-up-dns-options
Add `--dns-option` to `docker run` and hide `--dns-opt`
2016-11-10 16:20:17 +01:00
Victor Vieux 0ae9598f96 rename plugin manifest
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-11-10 00:09:23 -08:00
Victor Vieux e876381912 Merge pull request #28224 from vieux/fix_manpages
fix manpages
2016-11-09 23:22:30 -08:00
yuexiao-wang b6fe99530c Remove redundant parameter and fix typos
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2016-11-10 11:05:31 +08:00
Victor Vieux 1a34843c0c Merge pull request #28164 from anusha-ragunathan/plugin-build
Add plugin create functionality.
2016-11-09 17:49:51 -08:00
Victor Vieux 96c16101dd fix manpages
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-11-09 17:11:14 -08:00
Aaron Lehmann 65e1e166ee Add unlock key rotation
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-11-09 16:09:01 -08:00
Aaron Lehmann 56b7ad90b1 Revise swarm init/update flags, add unlocking capability
- Neither swarm init or swarm update should take an unlock key
- Add an autolock flag to turn on autolock
- Make the necessary docker api changes
- Add SwarmGetUnlockKey API call and use it when turning on autolock
- Add swarm unlock-key subcommand

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-11-09 16:09:00 -08:00
Tonis Tiigi d006a04357 Add support for swarm init lock and swarm unlock
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-11-09 16:09:00 -08:00
Anusha Ragunathan b825c58ff8 Add plugin create functionality.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-11-09 15:23:03 -08:00
Yong Tang b38ca0f4c3 Add `--dns-option` to `docker run` and hide `--dns-opt`
This fix is a follow up to #27567 based on:
https://github.com/docker/docker/pull/27567#issuecomment-259295055

In #27567, `--dns-options` has been added to `service create/update`,
together with `--dns` and `--dns-search`. The `--dns-opt` was used
in `docker run`.

This fix add `--dns-option` (not `--dns-options`) to `docker run/create`, and hide
`--dns-opt`. It is still possible to use `--dns-opt` with
`docker run/create`, though it will not show up in help output.

This fix change `--dns-options`to --dns-option` for `docker service create`
and `docker service update`.

This fix also updates the docs and bash/zsh completion scripts.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-11-09 12:13:25 -08:00
Evan Hazlett 06666a5a23 use human readable units when listing secrets
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2016-11-09 14:27:46 -05:00
Evan Hazlett c7d7b50003 more review updates
- return err instead of wrap for update secret
- add omitempty for data in secret spec

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2016-11-09 14:27:45 -05:00
Evan Hazlett 0dc9115006 SecretRequestOptions -> SecretRequestOption
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2016-11-09 14:27:45 -05:00
Evan Hazlett 0bda23ec2b support labels for secrets upon creation; review updates
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2016-11-09 14:27:45 -05:00
Evan Hazlett b3bbcc1ba6 secrets: support simple syntax --secret foo
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2016-11-09 14:27:45 -05:00
Evan Hazlett 9074333957 review updates
- use Filters instead of Filter for secret list
- UID, GID -> string
- getSecrets -> getSecretsByName
- updated test case for secrets with better source
- use golang.org/x/context instead of context
- for grpc conversion allocate with make
- check for nil with task.Spec.GetContainer()

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2016-11-09 14:27:45 -05:00
Evan Hazlett 91c08eab93 move secretopt to opts pkg
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2016-11-09 14:27:45 -05:00
Evan Hazlett d22e1a91f6 secrets: enable secret inspect and rm by secret name
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2016-11-09 14:27:45 -05:00
Evan Hazlett 15b97a39d7 secrets: use explicit format when using secrets
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2016-11-09 14:27:44 -05:00
Evan Hazlett 2b0fa52c09 update to support new target in swarmkit
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2016-11-09 14:27:44 -05:00
Evan Hazlett 6bbc35a743 simplify secret lookup on service create
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2016-11-09 14:27:44 -05:00
Evan Hazlett ab5f829742 support the same secret with different targets on service create
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2016-11-09 14:27:44 -05:00
Evan Hazlett 8554b64b99 add secret support for service update
- add nosuid and noexec to tmpfs

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2016-11-09 14:27:44 -05:00
Evan Hazlett 4e8f1a7dd9 more review updates
- use /secrets for swarm secret create route
- do not specify omitempty for secret and secret reference
- simplify lookup for secret ids
- do not use pointer for secret grpc conversion

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2016-11-09 14:27:43 -05:00
Evan Hazlett 3f9494f1d6 review changes
- fix lint issues
- use errors pkg for wrapping errors
- cleanup on error when setting up secrets mount
- fix erroneous import
- remove unneeded switch for secret reference mode
- return single mount for secrets instead of slice

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2016-11-09 14:27:43 -05:00
Evan Hazlett 1be644fbcf secrets: secret management for swarm
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

wip: use tmpfs for swarm secrets

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

wip: inject secrets from swarm secret store

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

secrets: use secret names in cli for service create

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

switch to use mounts instead of volumes

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

vendor: use ehazlett swarmkit

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

secrets: finish secret update

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2016-11-09 14:27:43 -05:00
Vincent Demeester a11f7b1577 Merge pull request #28196 from allencloud/add-short-flag-for-force
add short flag for force
2016-11-09 18:11:58 +01:00
Sebastiaan van Stijn 45f8ef1668 Merge pull request #28163 from yongtang/11082016-help-ptr
Remove `-ptr` from the help output of `service create`
2016-11-09 17:53:06 +01:00
Kenfe-Mickael Laventure 801167fcec Add expected 3rd party binaries commit ids to info
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-11-09 07:42:44 -08:00
Vincent Demeester 2332454882 Merge pull request #27947 from milindchawre/fix_27798
Fixes #27798 : Update help for --blkio-weight parameter
2016-11-09 15:35:38 +01:00
Vincent Demeester fbbc2d3a6d Merge pull request #28201 from yuexiao-wang/test-func
Update function name for TestCalculBlockIO
2016-11-09 15:34:25 +01:00
Yong Tang 071c746e5e Remove `-ptr` from the help output of `service create`
This fix is based on the comment:
https://github.com/docker/docker/pull/28147#discussion_r86996347

Previously the output string of the `DurationOpt` is `duration-ptr`
and `Uint64Opt` is `uint64-ptr`. While it is clear to developers,
for a normal user `-ptr` might not be very informative.

On the other hand, the default value of `DurationOpt` and `Uint64Opt`
has already been quite informative: `none`. That means if no flag
provided, the value will be treated as none.
(like a ptr with nil as the default)

For that reason this fix removes the `-ptr`.

Also, the output in the docs of `service create` has been quite
out-of-sync with the true output. So this fix updates the docs
to have the most up-to-date help output of `service create --help`.

This fix is related to #28147.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-11-09 06:30:10 -08:00
milindchawre e87262cc2d Fixes #24083 : Improving cli help for flags with duration option
Signed-off-by: milindchawre <milindchawre@gmail.com>
2016-11-09 12:17:28 +00:00
yuexiao-wang 18caa28b66 Update function name for TestCalculBlockIO
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2016-11-09 17:43:10 +08:00
Vincent Demeester 01de03c7d0 Merge pull request #27997 from aaronlehmann/raft-options
cli: Add options for Raft snapshotting
2016-11-09 10:19:45 +01:00
allencloud 31c5b957e2 add short flag for force
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-11-09 14:40:47 +08:00
Victor Vieux 7fe223b68b Merge pull request #27745 from vieux/cli_backward_compose_api
allow client to talk to an older server
2016-11-08 18:27:23 -08:00
Victor Vieux 3f839084b0 Merge pull request #28088 from aluzzardi/service-ps-task-resolution
service ps: Truncate Task IDs
2016-11-08 17:44:15 -08:00
Victor Vieux f0c8571e5f Merge pull request #27567 from yongtang/24391-dns-setting
Add custom DNS settings to service definition
2016-11-08 17:43:00 -08:00
Andrea Luzzardi 5834d378e0 service ps: Truncate Task IDs
- Refactored to move resolution code into the idresolver
- Made `ps` output more bearable by shortening service IDs in task names

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2016-11-08 16:17:15 -08:00
Victor Vieux 086c47f5ee Merge pull request #27992 from Microsoft/jjh/minapitoinfo
Adds `MinAPIVersion` to docker version
2016-11-08 15:49:33 -08:00
Yong Tang 49e528e18a Add custom DNS settings to service update
This fix adds `--dns-add`, `--dns-rm`, `--dns-opt-add`, `--dns-opt-rm`,
`--dns-search-add` and `--dns-search-rm` to `service update`.

An integration test and a unit test have been added to cover the changes in this fix.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-11-08 15:41:32 -08:00
Yong Tang f40b12d0f7 Add custom DNS settings to service definition
This fix tries to fix the issue raised in 24391 about allowing
custom DNS settings to service definition.

This fix adds `DNSConfig` (`Nameservers`, `Options`, `Search`) to
service definition, as well as `--dns`, `--dns-opt`, and `dns-search`
to `service create`.

An integration test has been added to cover the changes in this fix.

This fix fixes 24391.

A PR in swarmkit will be created separately.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-11-08 15:41:32 -08:00
Tibor Vass a3d806f0bb Merge pull request #28142 from vieux/plugin_install_args
support settings in docker plugins install
2016-11-08 15:05:39 -08:00
Aaron Lehmann 2af34ea285 cli: Add options for Raft snapshotting
Add the following options to "swarm init" and "swarm update":

- --max-snapshots: Retain this many old Raft snapshots in addition
  to the latest one

- --snapshot-interval: Number of log entries between Raft snapshots

These options already existed in SwarmKit and the Docker API but were
never exposed in the CLI. I'm adding them here to fix this oversight.

--max-snapshots may be useful for debugging purposes and more
conservative users who want to store rolling backups of old versions of
the Raft state.

--snapshot-interval is most useful for performance tuning. The default
value of 10000 may not be ideal for some setups.

There is also a LogEntriesForSlowFollowers option that is not exposed. I
decided not to expose it along with these others because I don't think
it's generally useful (and I'm not sure what I would call the CLI flag).
But if people want, I can expose it for the sake of completeness.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-11-08 13:14:01 -08:00
Victor Vieux 772dfcbeb1 Merge pull request #28147 from yongtang/27567-service-update-docs-plural-form
Change to plural forms for help output of `docker service update`
2016-11-08 11:14:40 -08:00
Vincent Demeester b04bb19101 Merge pull request #27710 from allencloud/show-num-for-global-service-in-service-ls
support show numbers of global service in service ls command
2016-11-08 18:43:53 +01:00
Yong Tang af8ebf69db Change to plural forms for help output of `docker service update`
This fix is based on the comment in
https://github.com/docker/docker/pull/27567#discussion_r86910604

Basically, in the help output of `docker service update`, the `--xxx-add`
flags typically have plural forms while `--xxx-rm` flags have singular
forms.

This fix updates the help output for consistency.

This fix also updates the related docs in `service_update.md`.
The help output in `service_update.md` has been quite out-of-sync
with the actual output so this fix replaces the output with the
most up-to-date output.

This fix is related to #27567.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-11-08 05:53:56 -08:00
Akihiro Suda c82d5e3c56 Merge pull request #28157 from yuexiao-wang/update-checkpoint
Update for docker checkpoint
2016-11-08 22:36:22 +09:00
Victor Vieux 4ae7176ffb always add but hide experimental cmds and flags
Signed-off-by: Victor Vieux <vieux@docker.com>

update cobra and use Tags

Signed-off-by: Victor Vieux <vieux@docker.com>

allow client to talk to an older server

Signed-off-by: Victor Vieux <vieux@docker.com>
2016-11-08 04:55:27 -08:00
Vincent Demeester 544b21fb65 Merge pull request #28153 from YuPengZTE/devCtx
context.Context should be the first parameter of a function
2016-11-08 12:40:32 +01:00
yuexiao-wang cd2269a456 Update for docker checkpoint
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2016-11-08 16:56:29 +08:00
Sebastiaan van Stijn 6edfb7558f Merge pull request #28117 from ping035627/ping035627-patch-1107
Modify to improve code readability
2016-11-08 09:44:45 +01:00
allencloud 7891d349b3 support show numbers of global service in service ls command
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-11-08 16:17:15 +08:00
yupeng 7113bbf2c6 context.Context should be the first parameter of a function
Signed-off-by: yupeng <yu.peng36@zte.com.cn>
2016-11-08 14:51:17 +08:00
Victor Vieux 41513e3051 support settings in docker plugins install
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-11-07 22:49:22 -08:00
John Howard 089b33edd8 Adds minimum API version to version
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-11-07 21:20:00 -08:00
Yong Tang 3baa727ed1 Add `--tty` to `docker service create/update`
This fix tries to add `--tty` to `docker service create/update`. As was
specified in 25644, `TTY` flag has been added to SwarmKit and is
already vendored.

This fix add `--tty` to `docker service create/update`.

Related document has been updated.

Additional integration tests has been added.

This fix fixes 25644.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-11-07 16:42:32 -08:00
WangPing 713c7cd81e modify to improve code readability
Signed-off-by: WangPing <present.wp@icloud.com>

align

Signed-off-by: WangPing <present.wp@icloud.com>

align

Signed-off-by: WangPing <present.wp@icloud.com>
2016-11-08 08:37:44 +08:00
Misty Stanley-Jones 6780c318a3 Merge pull request #28029 from tealtail/27994-add-service-ls-truncate-opt
remove COMMAND column from `service ls` output. closes #27994
2016-11-07 14:39:16 -08:00
Aaron Lehmann 7a50218855 Merge pull request #25974 from kunalkushwaha/mount-add
correct handling of volumes while service update.
2016-11-07 10:34:22 -08:00
Vincent Demeester dd33c288ec Merge pull request #25983 from jhorwit2/jah/ps-refactor
Add -a option to service/node ps
2016-11-07 17:33:10 +01:00
Alicia Lauerman 1491ae50e0 remove COMMAND column from service ls output. closes #27994
Signed-off-by: Alicia Lauerman <alicia@eta.im>
2016-11-06 13:32:44 -05:00
Josh Horwitz 21096cfc05 Add -a option to service/node ps
Signed-off-by: Josh Horwitz <horwitzja@gmail.com>
2016-11-06 07:40:39 -05:00
Victor Vieux db706f3c38 Merge pull request #28010 from vieux/fix_experimental_client
always add but hide experimental cmds and flags
2016-11-04 13:49:19 -07:00
Victor Vieux 1e10649f55 update cobra and use Tags
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-11-04 12:04:14 -07:00
Antonio Murdaca b338ab7c41 cli/info: fix seccomp warning
also reword seccomp warning around default seccomp profile

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-11-04 19:25:51 +01:00
Yong Tang 1cab3b32a6 Add `--cpus` flag to control cpu resources
This fix tries to address the proposal raised in 27921 and add
`--cpus` flag for `docker run/create`.

Basically, `--cpus` will allow user to specify a number (possibly partial)
about how many CPUs the container will use. For example, on a 2-CPU system
`--cpus 1.5` means the container will take 75% (1.5/2) of the CPU share.

This fix adds a `NanoCPUs` field to `HostConfig` since swarmkit alreay
have a concept of NanoCPUs for tasks. The `--cpus` flag will translate
the number into reused `NanoCPUs` to be consistent.

This fix adds integration tests to cover the changes.

Related docs (`docker run` and Remote APIs) have been updated.

This fix fixes 27921.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-11-04 09:43:10 -07:00
Justin Cormack 4758d72fa3 Merge pull request #26276 from runcom/seccomp-conf
daemon: add a flag to override the default seccomp profile
2016-11-04 15:45:30 +00:00
Vincent Demeester 38a582f54c Merge pull request #27857 from vasil-yordanov/docker-service-hostname-2
Adding the hostname option to docker service command
2016-11-04 15:22:55 +01:00
Vincent Demeester 36e659c019 Merge pull request #28045 from vincentbernat/fix/inspect-short-description
cli: shorten description of "inspect" subcommand
2016-11-04 08:15:49 +01:00
Kunal Kushwaha b8cf9a880e correct handling of volumes while service update.
Updating a service to replace a volume is handled properly now.
Fixes bug#25772

Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
2016-11-04 10:15:18 +09:00
Victor Vieux eb522dac24 always add but hide experimental cmds and flags
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-11-03 17:31:12 -07:00
Vincent Bernat 0e6f4e7cda cli: shorten description of "inspect" subcommand
The short description should be kept short. Spanning on several lines is
a bit ugly. A user can still get more information in the manual or we
can expand the long description instead if we want (there is currently
none).

This reverts a bit of #26683.

Signed-off-by: Vincent Bernat <vincent@bernat.im>
2016-11-03 20:46:28 +01:00
Victor Vieux 3014d36cd9 fix double [y/N] in container prune
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-11-03 10:33:17 -07:00
Sebastiaan van Stijn 938d24ab51 Merge pull request #27910 from dperny/node_ip_in_raft
Auto-detect node IP address
2016-11-03 10:30:55 -07:00
Drew Erny 2cd4028024 added node ip autodetection
Manager now auto-detects the address that an agent connects to the cluster
from and stores it. This is useful for many kinds of internal cluster
management tools.

Signed-off-by: Drew Erny <drew.erny@docker.com>
2016-11-03 08:10:14 -07:00
Vincent Demeester ee42b42f3c Merge pull request #27934 from yuexiao-wang/volume-create
Update descriptions for the docker volume sub-command, such as  create,list and inspect
2016-11-03 03:12:10 -07:00
yuexiao-wang 816560ffe9 Update for docker volume create
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2016-11-03 22:40:04 +08:00
Nikolay Milovanov 19b7bc1739 Adding the hostname option to docker service command
Signed-off-by: Nikolay Milovanov <nmil@itransformers.net>
2016-11-03 10:02:14 +00:00
Akihiro Suda 51cb4aa7b8 cli: add `--mount` to `docker run`
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2016-11-03 07:08:59 +00:00
milindchawre ec7d9291b8 Fixes #27798 : Update help for --blkio-weight parameter
Signed-off-by: milindchawre <milindchawre@gmail.com>
2016-11-03 06:42:15 +00:00
Vincent Demeester 07f77b78ea Add support for Names and ID in stats format
This adds support to display names or id of container instead of what
was provided in the request.

This keeps the default behavior (`docker stats byname` will display
`byname` in the `CONTAINER` colmun and `docker stats byid` will display
the id in the `CONTAINER` column) but adds two new format directive.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-11-03 07:20:46 +01:00
Sebastiaan van Stijn e279ecacc5 Merge pull request #27979 from allencloud/more-specific-in-service-scale-description
add replicated in service scale command description
2016-11-02 18:01:59 -07:00
Antonio Murdaca 557db1ea68 daemon: add a flag to override the default seccomp profile
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-11-02 21:41:29 +01:00
allencloud 503053819e node rm can be applied on not only active node
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-11-02 17:22:04 +08:00
allencloud 39e34ed1a3 add replicated in service scale command description
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-11-02 16:15:57 +08:00
Sebastiaan van Stijn 81e6e5e36d Merge pull request #27948 from WeiZhang555/consistent-filters
Replace all "Filter" field with "Filters" for consistency
2016-11-02 00:53:15 -07:00
Sebastiaan van Stijn d4f4ad0ee4 Merge pull request #27942 from yuexiao-wang/remove-const
Remove some redundant consts
2016-11-01 20:43:50 -07:00
yuexiao-wang 3acdab83fb Remove some redundant consts
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2016-11-02 16:42:42 +08:00
Sebastiaan van Stijn 63719e1a24 Merge pull request #27864 from vdemeester/add-statsformat-to-configfile
Add StatsFormat to the config.json file
2016-11-01 20:32:13 -07:00
Michael Crosby 3a5d54290d Merge pull request #27953 from thaJeztah/fix-deprecation-version
Update deprecation versions for "email" and colon in "security options"
2016-11-01 14:31:32 -07:00
Michael Crosby 09caa1ae97 Merge pull request #22641 from cpuguy83/build_finalization
Adds ability to flatten image after build
2016-11-01 14:30:18 -07:00
Brian Goff b90c048804 Adds ability to squash image after build
Allow built images to be squash to scratch.
Squashing does not destroy any images or layers, and preserves the
build cache.

Introduce a new CLI argument --squash to docker build
Introduce a new param to the build API endpoint `squash`

Once the build is complete, docker creates a new image loading the diffs
from each layer into a single new layer and references all the parent's
layers.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-11-01 13:41:59 -04:00
Sebastiaan van Stijn ac7d79389a Update deprecation versions for "email" and colon in "security options"
These features were originally scheduled
for removal in docker 1.13, but we changed
our deprecation policy to keep features
for three releases instead of two.

This updates the deprecation version
to match the deprecation policy.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-11-01 09:12:27 -07:00
Zhang Wei 9eceaa926f Replace all "Filter" field with "Filters" for consistency
In file `api/types/client.go`, some of the "*Options{}" structs own a
`Filters` field while some else have the name of `Filter`, this commit
will rename all `Filter` to `Filters` for consistency. Also `Filters`
is consistent with API with format `/xxx?filters=xxx`, that's why
`Filters` is the right name.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-11-01 23:09:30 +08:00
Doug Davis e7e5e6138f Merge pull request #27930 from YuPengZTE/devLogout
Align with other cli descriptions
2016-11-01 08:39:04 -04:00
yupeng 89db77511c Align with other cli descriptions
Signed-off-by: yupeng <yu.peng36@zte.com.cn>
2016-11-01 13:41:49 +08:00
Sebastiaan van Stijn 256b9c6011 Merge pull request #27901 from ripcurld00d/load_stdin_valid
Validate docker-load receives a tar file
2016-10-31 14:23:18 -07:00
Sebastiaan van Stijn 36e66d54c9 Merge pull request #26683 from yuexiao-wang/update-inspect
Modify short and flags for docker inspect
2016-10-31 13:39:59 -07:00
Daniel Nephin e7e0837702 Generate container create response from swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-10-31 11:16:02 -04:00
Daniel Nephin 010023c3c6 Use a config to generate swagger api types
Moves the resposne types to a package under api/types

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-10-31 11:13:41 -04:00
Daniel Nephin 120c5f9964 Generate VolumesCreateRequest from the swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-10-31 11:13:41 -04:00
Boaz Shuster fdbf29e1fa Validate docker-load receives a tar file
To load an image from a tar file, you can specify
the tar file in the -i/--input option:
docker load -i image_1.tar

or using stdin:

docker load < image_1.tar
cat image_1.tat | docker load

If the image file isn't given the `docker load`
command gets stuck.

To avoid that, the load makes sure the CLI input is
not a terminal or the `--input` option was set.
If not then an error message is shown.

Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
2016-10-31 15:30:55 +02:00
yuexiao-wang 6027424adf Modify short and flags for docker inspect
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2016-10-31 18:11:25 +08:00
Qiang Huang faac177285 Fix bunch of typos
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-10-29 15:03:26 +08:00
Lily Guo 378ae7234a Service create --group param
--group-add was used for specifying groups for both service create
and service update. For create it was confusing since we don't have
an existing set of groups. Instead I added --group to create, and
moved --group-add to service update only, like --group-rm
This deals with issue 27646

Signed-off-by: Lily Guo <lily.guo@docker.com>

Update flag documentation

Specify that --group, --group-add and --groupd-rm refers to
supplementary user groups

Signed-off-by: Lily Guo <lily.guo@docker.com>

Fix docs for groups and update completion scripts

Signed-off-by: Lily Guo <lily.guo@docker.com>
2016-10-28 13:26:31 -07:00
Vincent Demeester 4403644a9e Merge pull request #27369 from cezarsa/hc
Add --health-* flags to service create and update
2016-10-28 21:59:52 +02:00
Vincent Demeester 908aa5b408 Add StatsFormat to the config.json file
As for `ps`, `images`, `network ls` and `volume ls`, this makes it
possible to define a custom default format.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-10-28 11:48:25 -07:00
Cezar Sa Espinola 87e916a171 Add --health-* commands to service create and update
A HealthConfig entry was added to the ContainerSpec associated with the
service being created or updated.

Signed-off-by: Cezar Sa Espinola <cezarsa@gmail.com>
2016-10-28 15:19:08 -02:00
boucher 5ddcbc3c00 Allow providing a custom storage directory for docker checkpoints
Signed-off-by: boucher <rboucher@gmail.com>
2016-10-28 07:56:05 -04:00
Vincent Demeester 4b65bdd802 Merge pull request #27654 from gaocegege/add-quiet-mode-to-service-ps
Add -q option to `docker service ps`
2016-10-28 05:21:03 +02:00
Ce Gao 4c1560e987 fixes #27643
Signed-off-by: Ce Gao <ce.gao@outlook.com>
2016-10-28 08:02:57 +08:00
Sebastiaan van Stijn 881831531a Merge pull request #26988 from thaJeztah/remove-service-update-name-flag
Remove service update name flag
2016-10-27 16:55:47 -07:00
Sebastiaan van Stijn 090093bdbf Merge pull request #27701 from ripcurld00d/unit_test_formatter_stats
Add unit tests to cli/command/formatter/stats.go
2016-10-27 15:10:47 -07:00
Yong Tang 1250d2afae Add `--env-file` flag to `docker create service`
This fix tries to address the issue in 24712 and add
`--env-file` file to `docker create service`.

Related documentation has been updated.

An additional integration has been added.

This fix fixes 24712.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-10-27 11:48:32 -07:00
Sebastiaan van Stijn 6c80d2bb83 Remove --name flag from service update
The --name flag was inadvertently added to
docker service update, but is not supported,
as it has various side-effects (e.g., existing
tasks are not renamed).

This removes the flag from the service update
command.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-10-27 09:16:29 -07:00
Boaz Shuster c1da6dc7ac Add unit tests to cli/command/formatter/stats.go
Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
2016-10-27 18:00:38 +03:00
Sebastiaan van Stijn 3b4084cb50 Merge pull request #27759 from Microsoft/jjh/fixstats
Windows: Fix stats CLI
2016-10-26 18:17:18 -07:00
Erik St. Martin 4f320d7c2a Implementing support for --cpu-rt-period and --cpu-rt-runtime so that
containers may specify these cgroup values at runtime. This will allow
processes to change their priority to real-time within the container
when CONFIG_RT_GROUP_SCHED is enabled in the kernel. See #22380.

Also added sanity checks for the new --cpu-rt-runtime and --cpu-rt-period
flags to ensure that that the kernel supports these features and that
runtime is not greater than period.

Daemon will support a --cpu-rt-runtime flag to initialize the parent
cgroup on startup, this prevents the administrator from alotting runtime
to docker after each restart.

There are additional checks that could be added but maybe too far? Check
parent cgroups to ensure values are <= parent, inspecting rtprio ulimit
and issuing a warning.

Signed-off-by: Erik St. Martin <alakriti@gmail.com>
2016-10-26 11:33:06 -04:00
Sebastiaan van Stijn 4c4545c92f Merge pull request #27702 from tonistiigi/net-builder0
add --network option for docker build
2016-10-25 21:50:33 -07:00
John Howard dff7842790 Windows: Fix stats CLI
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-10-25 19:57:47 -07:00
sandyskies 3c9dff2f75 add --network option for docker build
Signed-off-by: sandyskies <chenmingjie0828@163.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-10-25 10:25:36 -07:00
Akihiro Suda d5d520f0d7 add `docker network prune`
`docker network prune` prunes unused networks, including overlay ones.
`docker system prune` also prunes unused networks.

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2016-10-25 06:43:54 +00:00
Sebastiaan van Stijn f039ba83d0 Merge pull request #24533 from yongtang/24392-docker-info-label-duplicate-keys
Remove duplicate keys in labels of `docker info`
2016-10-24 18:12:28 -07:00
Vincent Demeester d7a55774ed Merge pull request #27697 from amitkris/fix_units_import
Correct go-units import in cli/command/formatter/stats.go
2016-10-24 16:59:15 -07:00
Kenfe-Mickael Laventure 66bd963b76 Make experimental a runtime flag
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-10-24 15:20:01 -07:00
Amit Krishnan 15bbb61711 Correct go-units import in cli/command/formatter/stats.go
from src/github.com/docker/go-units -> github.com/docker/go-units

Signed-off-by: Amit Krishnan <krish.amit@gmail.com>
2016-10-24 15:06:58 -07:00
Vincent Demeester 6ec439e875 Merge pull request #27596 from aaronlehmann/rolling-restart
Add force option to service update
2016-10-22 13:37:12 +02:00
Sebastiaan van Stijn 0f7cb7208c Merge pull request #27117 from dnephin/swagger-gen
Add swagger.yaml and generate a few types from the spec
2016-10-21 18:15:28 -07:00
Aaron Lehmann dfed71a6dd Add force option to service update
Currently, there's no way to restart the tasks of a service without
making an actual change to the service. This leads to us giving awkward
workarounds as in
https://github.com/docker/docker.github.io/pull/178/files, where we tell
people to scale a service up and down to restore balance, or make
unnecessary changes to trigger a restart.

This change adds a --force option to "docker service update", which
forces the service to be updated even if no changes require that.

Since rolling update parameters are respected, the user can use
"docker service --force" to do a rolling restart. For example, the
following is supported:

   docker service update --force --update-parallelism 2 \
   --update-delay 5s myservice

Since the default value of --update-parallelism is 1, the default
behavior is to restart the service one task at a time.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-10-21 17:43:27 -07:00
Victor Vieux 85a65c7536 Merge pull request #27564 from mlaventure/add-networks-format-to-ps
Add Networks placeholder to ps --format
2016-10-20 18:43:46 -07:00
Tõnis Tiigi 9ef3b7e6ff Merge pull request #27530 from allencloud/change-join-role-display-judge
change join node role judge
2016-10-20 17:46:08 -07:00
Daniel Nephin ef87035bbb Generate api/types:Image from the swagger spec
and rename it to a more appropriate name ImageSummary.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-10-20 13:24:23 -07:00
Aaron Lehmann 3affd9570f Merge pull request #27516 from allencloud/change-remove-multi-nodes
make every node and plugin removal call api
2016-10-20 10:10:52 -07:00
Kenfe-Mickael Laventure 08ac5a3039 Add Networks placeholder to ps --format
Passing {{.Networks}} to the format parameter will prompt ps to
display all the networks the container is connected to.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-10-20 07:41:56 -07:00
Jonh Wendell a528b05dab Exec: Add ability to set environment variables
Keeping the current behavior for exec, i.e., inheriting
variables from main process. New variables will be added
to current ones. If there's already a variable with that
name it will be overwritten.

Example of usage: docker exec -it -e TERM=vt100 <container> top

Closes #24355.

Signed-off-by: Jonh Wendell <jonh.wendell@redhat.com>
2016-10-19 12:39:25 -02:00
allencloud f2a6d37388 change join node role judge
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-10-19 19:47:42 +08:00
allencloud 49512f901c make every node and plugin removal call api
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-10-19 06:40:30 +08:00
Aaron Lehmann 06ebd4517d Service update failure thresholds and rollback
This adds support for two enhancements to swarm service rolling updates:

- Failure thresholds: In Docker 1.12, a service update could be set up
  to either pause or continue after a single failure occurs. This adds
  an --update-max-failure-ratio flag that controls how many tasks need to
  fail to update for the update as a whole to be considered a failure. A
  counterpart flag, --update-monitor, controls how long to monitor each
  task for a failure after starting it during the update.

- Rollback flag: service update --rollback reverts the service to its
  previous version. If a service update encounters task failures, or
  fails to function properly for some other reason, the user can roll back
  the update.

SwarmKit also has the ability to roll back updates automatically after
hitting the failure thresholds, but we've decided not to expose this in
the Docker API/CLI for now, favoring a workflow where the decision to
roll back is always made by an admin. Depending on user feedback, we may
add a "rollback" option to --update-failure-action in the future.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-10-18 10:09:50 -07:00
Yong Tang 805f669512 Remove duplicate keys in labels of `docker info`
This fix tries to address the issue raised in 24392 where
labels with duplicate keys exist in `docker info`, which
contradicts with the specifications in the docs.

The reason for duplicate keys is that labels are stored as
slice of strings in the format of `A=B` (and the input/output).

This fix tries to address this issue by checking conflict
labels when daemon started, and remove duplicate labels (K-V).

The existing `/info` API has not been changed.

An additional integration test has been added to cover the
changes in this fix.

This fix fixes 24392.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-10-18 07:45:27 -07:00
Justin Cormack 879b4d1fba Merge pull request #27476 from yuexiao-wang/fix-typos-volume
Fix some typos
2016-10-18 13:50:20 +01:00
Justin Cormack d52f04b7c1 Merge pull request #27478 from allencloud/wrap-line-in-deleted-containers
wrap line in deleted containers when pruning
2016-10-18 13:48:44 +01:00
Vincent Demeester 3eeb334ccc Merge pull request #22566 from yongtang/22471-daemon-shutdown-timeout
Add config parameter to change per-container stop timeout during daemon shutdown
2016-10-18 14:33:09 +02:00
yuexiao-wang 24d0191a3a Fix typs from go to Go
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2016-10-18 19:40:16 +08:00
allencloud 093072cc18 wrap line in deleted containers when pruning
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-10-18 14:20:12 +08:00
Justin Cormack 3ab6e03ba3 Merge pull request #26519 from AkihiroSuda/fix-cli-command-formatter-json-support
Fix broken JSON support in cli/command/formatter
2016-10-17 22:44:04 +01:00
Yong Tang c424fb0e3d Update `docker stop` and `docker restart` to allow not specifying timeout and use the one specified at container creation time.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-10-17 12:53:35 -07:00
Vincent Demeester 6c3c3a87ba Revert docker volume column name to VOLUME_NAME
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-10-17 20:03:31 +02:00
Vincent Demeester 6566662d1b Merge pull request #27074 from cyli/bump-notary-version
Bump notary version to 0.4.2
2016-10-17 16:35:57 +02:00
Akihiro Suda c11155f0d1 Fix broken JSON support in cli/command/formatter
How to test:

    $ docker ps --format '{{json .}}'
    $ docker network ls --format '{{json .}}'
    $ docker volume ls --format '{{json .}}'

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2016-10-17 08:07:17 +00:00
Vincent Demeester cfc3b1a3ff Merge pull request #27236 from allencloud/return-nil-when-no-node-or-service
return nil when no node or service to avoid additional api call
2016-10-16 18:41:31 +02:00
cyli 43d7c0ed9a Fix API incompatibilities between notary v0.3.0 and v0.4.2:
- some function signatures have changed - use the new ones
- re-generate the notary delegation key certs, since notary doesn't allow SHA1
- fix some error message mapping because now if a root rotation fails to validate trusted operations will fail

Signed-off-by: cyli <cyli@twistedmatrix.com>
2016-10-14 17:53:34 -07:00
Yong Tang 0cb01799e9 Allow `docker deploy` command accept filename with/without extension
This fix tries to address the issue raised in 25855 where the command
`docker deploy` can only accept a STACK without extension of `.dab`.
In other words, `docker deploy hellojavaee.dab` gives an error:
```
Bundle hellojavaee.dab.dab not found. Specify the path with --file
```

This fix updates the way namespace STACK is taken so that in case
`STACK.dab` is provided with `docker deploy`:
```
$ docker deploy STACK.dab
```
The `STACK` is used as namespace (instead of `STACK.dab`).

NOTE: This fix will only allows `.dab` extension in namespace, because
it is not possible to have a namespace with `.` in the middle. In other
words, a namespace `hello.java.ee` will not work anyway (whether the file
`hello.java.ee` exists or not).

An additional integration test has been added to cover the changes.

This fix fixes 25855.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-10-14 11:44:15 -07:00
Sebastiaan van Stijn b2de6e55bd Merge pull request #27333 from yongtang/27049-ListOpt
Use ListOpt for `docker network create --label` and `docker volume create --label`
2016-10-14 00:31:09 -07:00
Sebastiaan van Stijn bfe16dcfe2 Merge pull request #26819 from ripcurld00d/fix_stats_mutex
Hide the mutex lock in formatter.ContainerStats
2016-10-13 17:38:22 -07:00
yuexiao-wang b6fbe832ac Fix the incorrect description for NewInStream
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2016-10-13 22:33:09 +08:00
Yong Tang 49e49e8e00 Use ListOpt for `docker network create --label` and `docker volume create --label`
This fix is related to 27049 and 27047. For `--label` flag, if string slice is
used (like 27047), then quote can not be used in command and will result in
an error :
```
line 1, column 14: bare " in non-quoted-field
```

The issue 27047 has been fixed by 27049.

Recently I found out that both `docker network create --label` and `docker volume create --label`
still use string slice and will return the same error when quotes are used.

This fix fixes `docker network create --label` and `docker volume create --label`
by using `ListOpt` (as 27049) as well.

This fix has been tested and verified manually.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-10-12 16:06:34 -07:00
Sebastiaan van Stijn 2e2f16a621 Merge pull request #27294 from mlaventure/hide-unused-volume-fields
Move types.Volumes optional fields under a new type
2016-10-11 23:55:25 +02:00
Kenfe-Mickael Laventure 5018781cab Move types.Volumes optional fields under a new type
This allows us to hide those fields when they are not filled.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-10-11 11:49:26 -07:00
allencloud 6ef1c7deaf return nil when no node or service to avoid additional api call
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-10-11 10:59:16 +08:00
Boaz Shuster 3bc50c45ba Hide the mutex in formatter.ContainerStats
The formatter.ContainerStats struct exposes its Mutex.
This is a bad design and should be fixed.

To fix that, I separated the statistics
attributes from ContainerStats to StatsEntry and
hid the mutex. Notice that the mutex protects both
the `err` field and the statistics attributes.

Then, implemented SetStatistics, SetError, GetStatistics
and GetError to avoid races.

Moreover, to make this less granular, I decided to
replace the read-write mutex with the regular mutex and
to pass a StatsEntry slice to formatter.ContainerStatsWrite

Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
2016-10-10 21:52:53 +03:00
allencloud 871b692833 better prune and system df
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-10-11 00:42:21 +08:00
Sebastiaan van Stijn 0c6d66b89a Merge pull request #26778 from WeiZhang555/parallel-operations
Support parallel kill,rm
2016-10-10 18:31:10 +02:00
yuexiao-wang 80bc917226 Add the OPTIONS and Fix the links for contain prune
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2016-10-11 00:13:33 +08:00
John Howard e307da732a Windows: Support credential specs
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-10-06 09:32:22 -07:00
Alexander Morozov 8691f7c542 Merge pull request #25837 from reaperhulk/support-compressing-build-context
Add support for compressing build context during image build
2016-10-05 12:57:46 -07:00
Arnaud Porterie 71ffe11776 Merge pull request #26108 from mlaventure/data-mngt
New Data Management commands
2016-10-01 03:17:18 +00:00
Paul Kehrer e25646bbc0 Add support for compressing build context during image build
When sending a build context to a remote server it may be
(significantly) advantageous to compress the build context. This commit
adds support for gz compression when constructing a build context
using a command like "docker build --compress ."

Signed-off-by: Paul Kehrer <paul.l.kehrer@gmail.com>
2016-09-30 17:46:08 -05:00
Sebastiaan van Stijn ebfd0d6602 Merge pull request #27049 from dnephin/fix-label-flag-type
Use ListOpt for build labels
2016-09-30 23:40:08 +02:00
Kenfe-Mickael Laventure 3f8c4be283 Add new df subcomand to the system command
This command display the state of the data usage of the docker daemon.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-09-30 14:35:23 -07:00
Vincent Demeester e2870295aa Merge pull request #26697 from allencloud/change-service-scale-logic
validate service parameter in client side to avoid api call in `docker service scale`
2016-09-30 18:37:35 +02:00
Daniel Nephin d6b5a807d7 Use ListOpt for labels.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-09-29 17:59:52 -04:00
Kenfe-Mickael Laventure 6f8bb41ecb Add subcommand prune to the container, volume, image and system commands
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-09-29 07:42:53 -07:00
Kenfe-Mickael Laventure 82dc15836b Update Images() to allow retrieving specific image size data
Those data include:
 - size of data shared with other images
 - size of data unique to a given image
 - how many containers are using a given image

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-09-29 07:42:53 -07:00
allencloud 65b1e54c73 add \n in engine labels display in docker node inspect xxx --pretty
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-09-29 18:17:54 +08:00
Vincent Demeester 5ca7909308 Merge pull request #24850 from yongtang/24270-service-tasks-filter
Fix partial/full filter issue in `service tasks --filter`
2016-09-28 11:50:27 +02:00
Zhang Wei 5c1362ce59 Support parallel rm
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-09-28 12:07:18 +08:00
Zhang Wei f612b93d33 Support parallel kill
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-09-28 12:03:19 +08:00
Brian Goff 715d301f12 Merge pull request #26951 from AkihiroSuda/update-ut-cli-command-service
Fix cli/command/service/opts_test.go, and add some extra test cases
2016-09-27 20:30:26 -04:00
Vincent Demeester bf824fee21 Merge pull request #26255 from Microsoft/jjh/xenon-test-infrastructure
Add isolation to info - enables Hyper-V containers CI bring-up
2016-09-27 18:46:51 +02:00
Vincent Demeester b322c8e506 Merge pull request #26906 from allencloud/add-endpoint-mode-in-service-pretty
add endpoint mode in service pretty
2016-09-27 18:28:43 +02:00
Akihiro Suda 2126d8160d Fix cli/command/service/opts_test.go, and add some extra test cases
`m.Set("type=volume,target=/foo,volume-nocopy")` is valid even though it lacks "source"

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2016-09-27 15:27:02 +00:00
Yong Tang e0f229d2ca Let swarmkit handle cluster defaults in `swarm init` if not specified
This fix tries to address the issue raised in 24958 where previously
`docker swarm init` will automatically fill in all the default value
(instead of letting swarmkit to handle the default).

This fix update the `swarm init` so that initial value are passed only
when a flag change has been detected.

This fix fixes 24958.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-09-27 04:19:38 -07:00
allencloud cc375fafd0 add endpoint mode in service pretty
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-09-27 18:41:19 +08:00
Yong Tang 2d844ea5c8 Fix partial/full filter issue in `service tasks --filter`
This fix tries to address the issue related to 24108 and 24790, and
also the case from 24620#issuecomment-233715656

The reason for the failure case in the above mentioned issues is that
currently Task names are actually indexed by Service Name
(`e.ServiceAnnotations.Name`)

To fix it, a pull request in swarmkit (swarmkit/pull/1193) has been
opened separately.

This fix adds the integration tests for the above mentioned issues.
Swarmkit revendoring is needed to completely fix the issues.

This fix fixes 24108.
This fix fixes 24790.
This fix is related to 24620.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-09-26 16:01:20 -07:00
Sebastiaan van Stijn 53c51901d7 Merge pull request #23886 from AkihiroSuda/stackcli
add `docker stack ls`
2016-09-26 21:19:04 +02:00
Arnaud Porterie dc14c5aa27 Merge pull request #26839 from tonistiigi/build-cache
Implement build cache based on history array
2016-09-26 17:31:49 +00:00
allencloud a16fed83af validate service parameter in client side to avoid api call
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-09-26 17:18:02 +08:00
Aaron Lehmann 56d92bfdff cli: Add more nil checking to service pretty-printer
Currently, if the service mode is not "global", this code assumes that
Replicated is non-nil. This assumption may not be true in the future.
Instead of making the assumption, explicitly check that Replicated is
non-nil before using it.

Similarly, for limits and reservations, enclose methods that read from
Limits and Reservations within checks that those fields are non-nil.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-09-26 10:12:24 +01:00
Vincent Demeester e58c0c6e1b Merge pull request #25853 from jhorwit2/jah/event-refactor
Refactor to new engine-api events api
2016-09-24 11:07:12 +02:00
John Howard 266b7564a5 Add isolation to info
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-09-23 12:13:29 -07:00
Tõnis Tiigi fe4cc3fd77 Implement build cache based on history array
Based on work by KJ Tsanaktsidis

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: KJ Tsanaktsidis <kjtsanaktsidis@gmail.com>
2016-09-23 11:30:06 -07:00
Vincent Demeester cecd4904f3 Merge pull request #26516 from yongtang/26453-build-bad-syntax
Check bad syntax on dockerfile before building.
2016-09-23 12:24:20 +02:00
Vincent Demeester e7e32f0465 Merge pull request #26299 from allencloud/support-docker-node-ps-multi-nodes
support docker node ps multiNodes
2016-09-23 09:50:24 +02:00
Akihiro Suda b06f3f27a4 add `docker stack ls`
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2016-09-22 19:31:39 +00:00
Josh Horwitz d700b90576 Refactor to new events api
Signed-off-by: Josh Horwitz <horwitzja@gmail.com>
2016-09-22 14:42:06 -04:00
Misty Stanley-Jones bfbdb15f55 Clarify usage of --force when used on a swarm manager
Fixes #26125

Signed-off-by: Misty Stanley-Jones <misty@docker.com>
2016-09-21 13:05:33 -07:00
Daniel Nephin 685613f6c9 Merge pull request #24987 from ripcurld00d/stats_format_prod
Add format to stats
2016-09-21 10:38:21 -04:00
John Howard 1385ad8b00 Revert Box from HostConfig
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-09-20 12:01:04 -07:00
Vincent Demeester b7722cd80a Merge pull request #26716 from dnephin/move-system-commands
Create system  subcommand
2016-09-20 15:54:01 +02:00
Vincent Demeester 333a0f348f Merge pull request #25025 from cpuguy83/service_inspect_formatter
Add formatter for service inspect
2016-09-20 14:49:45 +02:00
Daniel Nephin 4ff733cf1c Merge pull request #26717 from dnephin/fix_experimental_commands
Make all the experimental subcommand consistent
2016-09-19 19:29:48 -04:00
Sebastiaan van Stijn 889980d6e3 Merge pull request #26579 from Microsoft/jjh/ociprocess
Windows: OCI `process` struct and console size to uint
2016-09-19 22:52:16 +02:00
Daniel Nephin 1136c3458b Create a system subcommand for events and info.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-09-19 16:29:17 -04:00
Brian Goff 20c5a9448d Add formatter for service inspect
Allows the user to use `pretty` as the format string.
This enables users to put custom format options into their CLI config
just like is supported for `docker ps` and `docker images`

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-09-19 16:28:19 -04:00
Daniel Nephin 3e1b9350f5 Make all the experimental subcommand consistent.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-09-19 16:27:23 -04:00
John Howard f14f7711e7 Windows: OCI process struct convergence
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-09-19 10:34:31 -07:00
Daniel Nephin 1f0f7ecb5a Only hide commands if the env variable is set.
Better formatting for usage template.
Group commands in usage to management/operation commands.
Remove the word Docker from the description of management commands.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-09-19 13:28:15 -04:00
Daniel Nephin 68b7f55a45 Move the search command to the registry package.
And move it back to the top-level command.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-09-19 13:28:15 -04:00
Daniel Nephin accc5d5bd4 Move canonical image and container commands into a command group
Hide some top level commands
Add docker container and image inspect commands.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-09-19 13:28:02 -04:00
Sebastiaan van Stijn a151a36595 Merge pull request #26268 from AkihiroSuda/eventsjsonl
add `docker events --format`
2016-09-19 17:30:27 +02:00
Boaz Shuster a4f3442403 Add the format switch to the stats command
Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
2016-09-18 14:16:13 +03:00
John Howard 41b980ad6d Merge pull request #25737 from Microsoft/jjh-statistics
Windows: Add support for docker stats
2016-09-17 09:31:24 -07:00
Sebastiaan van Stijn 3fc784d460 Merge pull request #26387 from Microsoft/jjh/securityopts
Only output security options if there are any
2016-09-16 23:05:30 +02:00
John Howard c323878331 Windows: stats support
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-09-16 11:56:15 -07:00
John Howard d0e960f3b1 Only output security options if there are any
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-09-16 10:05:21 -07:00
Akihiro Suda 0ae2a02ce6 add `docker events --format`
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2016-09-15 09:55:29 +00:00
Yong Tang 824707ea49 Check bad syntax on dockerfile before building.
This fix tries to address the issue raised in 26453 where bad syntax
on dockerfile is not checked before building, thus user has to wait
before seeing error in dockerfile.

This fix fixes the issue by evaluating all the instructions and check
syntax before dockerfile is invoked actually.

All existing tests pass.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-09-13 21:43:10 -07:00
Daniel Nephin 2f8c4333fe Fix testcases that expect trailing whitespace
and broken integration tests based of nil pointers

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-09-13 17:58:12 -04:00
Daniel Nephin db0952ad22 Refactor formatter.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-09-13 17:58:12 -04:00
Daniel Nephin d9cb421d69 Use opts.FilterOpt for filter flags.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-09-13 16:20:10 -04:00
Daniel Nephin 62f513507e Merge pull request #24761 from WeiZhang555/parallel-stop
Enhancement: allow parallel stop, pause, unpause
2016-09-13 10:46:51 -04:00
Yong Tang 9aba07679f Fix issue of `WARNING: --size ignored for volume` for `docker inspect`
When `docker inspect` is invoked, it is possible to pass a flag of
`-s` for container types to display size information. If `-s` is used
for non-container types then a warning `WARNING: --size ignored for volume`
will show up.

However, currently `WARNING: --size ignored for volume` will show up even
when `-s` is not passed to `docker inspect` for non-container types.

This fix fixes this issue by checking if `-s` has been passed or not (`getSize`).
Also, since image inspect does not support `-s`, `IsSizeSupported` has been changed
to false for images.

This fix is tested manually.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-09-12 23:08:19 -07:00
Zhang Wei 4570bfe8de Add parallel operation support for pause/unpause
Support parallel pause/unpause

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-09-13 11:01:28 +08:00
Zhang Wei 285fef282f Enhancement: allow parallel stop
Stop multiple containers in parallel to speed up stop process, allow
maximum 50 parallel stops.

Signed-off-by: Abhinav Dahiya <abhinavdtu2012@gmail.com>
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-09-13 10:50:55 +08:00
Brian Goff d23d33781a Merge pull request #26103 from sakeven/fix-validate-build-arg
validate build-arg
2016-09-12 09:15:58 -04:00
Antonio Murdaca aabe9468aa Merge pull request #26456 from dnephin/move_cli_command_registry
Remove registry/auth helper methods from the DockerCLI object
2016-09-12 15:11:04 +02:00
sakeven f39b39cccb validate build-arg
Signed-off-by: sakeven <jc5930@sina.cn>
2016-09-12 18:02:21 +08:00
Vincent Demeester 2dc3e0341b Merge pull request #26303 from yongtang/26300-docker-images-3-fractional-digits
Restrict size to 2 fractional digits for `docker images`
2016-09-10 11:32:45 +02:00
Daniel Nephin a26ba0e702 Remove remaining registry methods from DockerCLI.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-09-09 15:50:01 -04:00
Daniel Nephin 4ae4e66e3c Remove cli/command/credentials
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-09-09 15:50:01 -04:00
Daniel Nephin ed55f00674 Remove RetrieveAuthConfigs
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-09-09 15:50:01 -04:00
allencloud 6df46463a9 support docker node ps multiNodes
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-09-10 02:52:48 +08:00
Phil Estes 5fe882a494 Merge pull request #22049 from boucher/docker-checkpoint-restore
Implement containerd API for checkpoints
2016-09-09 13:36:55 -04:00
boucher 272868566b Update checkpoint comments to be more accurate
Signed-off-by: boucher <rboucher@gmail.com>
2016-09-09 12:13:46 -04:00
Daniel Nephin 0cf85349f3 Move image trust related cli methods into the image package.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-09-09 10:50:16 -04:00
boucher 9524caa317 Fix typo
Signed-off-by: boucher <rboucher@gmail.com>
2016-09-08 21:31:56 -04:00
boucher f0647193dc Initial implementation of containerd Checkpoint API.
Signed-off-by: boucher <rboucher@gmail.com>
2016-09-08 21:31:52 -04:00
Yong Tang c68bb57959 Restrict size to 2 fractional digits for `docker images`
This fix tries to address the issue raised in 26300. Previously
`docker images` will use `HumanSize()` to display the size which
has a fixed precision of 4 (thus 3 fractional digits). This
could be problematic in certain languages (e.g. , German, see
26300) as `.` may be interpreted as thousands-separator in number.

This fix use `CustomSize()` instead and limit the precision to 3
(thus 2 fractional digits).

This fix has been tested manually.

This fix fixes 26300.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-09-08 18:26:50 -07:00
Daniel Nephin e2f7387906 Fix a test that expects whitespace at the end of the line.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-09-08 15:50:14 -04:00
Daniel Nephin 8f3e3fb6e5 Replace api/client imports with cli/command in experimental files.
Using

git grep -l 'client\.DockerCli' cli/command/stack/ | xargs sed -i -e 's/client\.DockerCli/command\.Dockercli/g'

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-09-08 15:46:48 -04:00
Daniel Nephin 3bd1eb4b76 Move api/client -> cli/command
Using
  gomvpkg
     -from github.com/docker/docker/api/client
     -to github.com/docker/docker/cli/command
     -vcs_mv_cmd 'git mv {{.Src}} {{.Dst}}'

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-09-08 15:46:29 -04:00