Commit Graph

1152 Commits

Author SHA1 Message Date
Victor Vieux 40acabdfe9 fix a few golint errors
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 18:32:02 -08: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 b58a973b18 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
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
Vincent Demeester e360a30a41 Merge pull request #28540 from lixiaobing10051267/masterNewContainerId
expected new_container_id while testing ContainerCommit
2016-11-18 12:13:30 +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
lixiaobing10051267 e98be4c62f expected new_container_id while testing ContainerCommit
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
2016-11-18 10:21:04 +08:00
allencloud 42788cad9c update secret create url for consistency
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-11-18 10:18:21 +08: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
Victor Vieux 1ab47a8be8 error on cli when trying to use experimental feature with non experimental daemon
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-17 14:52:01 -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 05ddb16e59 refactor help func in CLI
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-17 10:54:10 -08: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
Sebastiaan van Stijn d9a5f6c80e Merge pull request #28512 from anusha-ragunathan/fix_enable
Cleanup after plugin install.
2016-11-17 10:16:47 +01: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
Sebastiaan van Stijn 6e6b37b0a2 Merge pull request #28322 from Microsoft/jjh/api1.26
Bump API to v1.26
2016-11-17 00:01:46 +01:00
Anusha Ragunathan 4749582510 Cleanup after plugin install.
During error cases, we dont cleanup correctly. This commit takes care
of removing the plugin, if there are errors after the pull passed. It
also shuts down the plugin, if there are errors after the plugin in the
enable path.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-11-16 14:45:51 -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
Tonis Tiigi 28f8f92963 Skip cli initialization for daemon command
Cli initialization pings back to remote API and
creates a deadlock if socket is already being
listened by systemd.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-11-16 13:19:45 -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
John Howard b5b095c01a Bump API to v1.26
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-11-14 14:24:02 -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
wefine 2eb3e2ce0f fix t.Errorf to t.Error in serveral _test.go
Signed-off-by: wefine <wang.xiaoren@zte.com.cn>
2016-11-14 17:54:43 +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 Stephens 13d6a1bb67 Show experimental flags and subcommands if enabled
Signed-off-by: John Stephens <johnstep@docker.com>
2016-11-11 17:43:06 -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 85e72de60c 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 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