Commit graph

2525 commits

Author SHA1 Message Date
allencloud
fd62b6c950 better prune and system df
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-10-11 00:42:21 +08:00
Vincent Demeester
febf53d91a Merge pull request #26996 from Microsoft/jjh/imageinspectosversion
(Windows) Inspect image populate OSVersion
2016-10-07 18:33:01 +02:00
John Howard
b7f537e811 Inspect populate image OSVersion
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-10-06 11:46:24 -07:00
John Howard
e85867cb68 Windows: Support credential specs
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-10-06 09:32:22 -07:00
Doug Davis
ed72c65a2a Merge pull request #27154 from pwzgorilla/master
typo: modified `Server` as `Serve`
2016-10-05 07:03:18 -04:00
mgniu
97a4548bb3 typo: modified Server as Serve
Signed-off-by: mgniu <mgniu@dataman-inc.com>
2016-10-05 12:20:31 +08:00
Antonio Murdaca
d1d505fa70
api/server/httputils: compile with go < 1.7
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-10-04 12:01:49 +02:00
Brian Goff
8b416fb025 Merge pull request #26960 from allencloud/make-remove-cloudprovider-network-return-204
make remove cloudprovider network return 204
2016-10-03 14:46:11 -04:00
Vincent Demeester
420e22fad4 Merge pull request #27060 from yongtang/27021-inspect-show-env
Disable HTML escaping for JSON strings in `docker inspect`
2016-10-02 14:32:56 +02:00
allencloud
ea07ef7a7c make remove network return 204
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-10-01 19:50:40 +08:00
Yong Tang
0fa20ad13b Disable HTML escaping for JSON strings in docker inspect
This fix tries to address the issue raised in 27021 where
HTML strings like (`&, >, <, etc`) in environmental variables
are escaped for JSON output for `docker inspect`. For example,
`TEST_ENV="soanni&rtr"` has been escaped to `TEST_ENV="soanni\u0026rtr"`

This fix disabled HTML escaping with `SetEscapeHTML`, which is available
since golang 1.7.0. This changes will be applied to all JSON output
that utilize `httputils.WriteJSON`.

An integration test has been added to cover the changes.

This fix fixes 27021.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-09-29 18:16:36 -07:00
Kenfe-Mickael Laventure
33f4d68f4d Add /{containers,volumes,images}/prune API endpoint
These new endpoints request the daemon to delete all resources
considered "unused" in their respective category:
  - all stopped containers
  - all volumes not attached to any containers
  - images with no associated containers

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-09-29 07:42:53 -07:00
Kenfe-Mickael Laventure
f2e11fb8d1 Add /system/df API endpoint
This endpoint return data regarding the space used by docker on disk

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-09-29 07:42:53 -07:00
Kenfe-Mickael Laventure
b717de5153 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
Kenfe-Mickael Laventure
c6db1e9c1b Add Size and RefCount fields to types.Volume
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-09-29 07:42:53 -07:00
Sebastiaan van Stijn
9f0593990f Merge pull request #26941 from runcom/docker-init-path-1
configure docker-init binary path
2016-09-28 13:12:59 +02:00
Vincent Demeester
97d4b9c465 Merge pull request #26074 from allencloud/return-err-when-remove-container-in-progress
make client side know container removal in progress
2016-09-27 18:48:03 +02:00
Vincent Demeester
b881148385 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
Antonio Murdaca
6a12685bb7
configure docker-init binary path
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-09-27 14:49:17 +02:00
Yong Tang
eb19c2f080 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
9a58f298d1 make client side know container removal in progress
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-09-27 18:06:54 +08:00
Vincent Demeester
b826bebda0 Merge pull request #24634 from thaJeztah/make-network-name-required
API return network-list if no network-name or id is provided
2016-09-27 10:20:38 +02:00
Aaron Lehmann
373d3200c2 Merge pull request #26885 from allencloud/add-swarm-types-comments-and-fix-nits
add swarm type comments and fix nits
2016-09-26 22:33:24 +01:00
Sebastiaan van Stijn
6ad4bf0a53 API return network-list if no network-name or id is provided
When calling the /networks/ endpoint with a trailing
slash, the default network was returned.

This changes the endpoint to return the list of networks
instead (same response as `/networks` without trailing
slash).

Also updated the description for GetNetworkByName to
explain that the "default" network is returned if
no name or id is provided.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-09-26 21:44:34 +02:00
Arnaud Porterie
7944480dd0 Merge pull request #26839 from tonistiigi/build-cache
Implement build cache based on history array
2016-09-26 17:31:49 +00:00
allencloud
c1925ce346 add swarm type comments and fix nits
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-09-26 17:17:52 +08:00
allencloud
6ae8c83ebe display no id in log when service creating fails
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-09-26 16:23:28 +08:00
John Howard
c4e1697274 Add isolation to info
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-09-23 12:13:29 -07:00
Tõnis Tiigi
690882c2e7 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
allencloud
9b4ba34d04 change-code-and-fix-docs-about-checkpoint
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-09-23 19:37:43 +08:00
Vincent Demeester
d9aec43a16 Merge pull request #26774 from thaJeztah/remove-engine-api-leftovers
Remove engine-api leftovers
2016-09-22 09:39:27 +02:00
Brian Goff
a7b0b6e2a9 Merge pull request #26770 from YuPengZTE/devEG
'eg.' should be 'e.g.'
2016-09-21 10:03:23 -04:00
Sebastiaan van Stijn
45818d6fc4
Removed engine-api leftovers
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-09-21 12:36:52 +02:00
YuPengZTE
0b86bca0b5 'eg.' should be 'e.g.'
Signed-off-by: YuPengZTE <yu.peng36@zte.com.cn>
2016-09-21 13:48:06 +08:00
John Howard
6b74e2f09d Revert Box from HostConfig
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-09-20 12:01:04 -07:00
Anusha Ragunathan
fefea805e9 Make graphdrivers work with pluginv2.
As part of making graphdrivers support pluginv2, a PluginGetter
interface was necessary for cleaner separation and avoiding import
cycles.

This commit creates a PluginGetter interface and makes pluginStore
implement it. Then the pluginStore object is created in the daemon
(rather than by the plugin manager) and passed to plugin init as
well as to the different subsystems (eg. graphdrivers, volumedrivers).
A side effect of this change was that some code was moved out of
experimental. This is good, since plugin support will be stable soon.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-09-20 08:49:48 -07:00
David Sheets
a003419fca Fix typo in api/types/container/host_config.go
Originally merged in #26061.

Signed-off-by: David Sheets <sheets@alum.mit.edu>
2016-09-20 10:41:08 +01:00
Michael Crosby
ee3ac3aa66 Add init process for zombie fighting
This adds a small C binary for fighting zombies.  It is mounted under
`/dev/init` and is prepended to the args specified by the user.  You
enable it via a daemon flag, `dockerd --init`, as it is disable by
default for backwards compat.

You can also override the daemon option or specify this on a per
container basis with `docker run --init=true|false`.

You can test this by running a process like this as the pid 1 in a
container and see the extra zombie that appears in the container as it
is running.

```c

int main(int argc, char ** argv) {
	pid_t pid = fork();
	if (pid == 0) {
		pid = fork();
		if (pid == 0) {
			exit(0);
		}
		sleep(3);
		exit(0);
	}
	printf("got pid %d and exited\n", pid);
	sleep(20);
}
```

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-09-19 17:33:50 -07:00
John Howard
53774423ff Windows: OCI process struct convergence
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-09-19 10:34:31 -07:00
John Howard
4a0419f536 Merge pull request #25737 from Microsoft/jjh-statistics
Windows: Add support for docker stats
2016-09-17 09:31:24 -07:00
Vincent Demeester
5d7b725071 Merge pull request #26606 from dnephin/move_errors
Move errors package to api/errors
2016-09-17 16:00:38 +02:00
Drew Erny
55454752f8 Added comments to PortConfig for greater clarity
I always forget which one is which. Now, I can't forget. This is
probably in the docs somewhere but now it's handy at a glance.

Signed-off-by: Drew Erny <drew.erny@docker.com>
2016-09-16 14:47:35 -07:00
John Howard
340e5233b2 Windows: stats support
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-09-16 11:56:15 -07:00
Daniel Nephin
bcb0405239 Use apiError in server version middleware.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-09-16 12:27:14 -04:00
Daniel Nephin
c452e1bfe6 Move errors/ to api/errors
Using:
        gomvpkg -from github.com/docker/docker/errors
                -to github.com/docker/docker/api/errors
                -vcs_mv_cmd "git mv {{.Src}} {{.Dst}}"

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-09-16 12:27:13 -04:00
boucher
0dfbf960d7 Fix the clashing route syntax for checkpoint/container delete.
Signed-off-by: boucher <rboucher@gmail.com>
2016-09-08 21:31:56 -04:00
boucher
d8fef66b03 Initial implementation of containerd Checkpoint API.
Signed-off-by: boucher <rboucher@gmail.com>
2016-09-08 21:31:52 -04:00
Daniel Nephin
0640a14b4f 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
Alexander Morozov
d959e7fac4 Merge pull request #26107 from dnephin/client_cleanup
Shrink the DockerCLI type
2016-09-08 12:18:46 -07:00
Michael Crosby
061cc41759 Merge pull request #26224 from q384566678/test-zhou
Modify rename function use tips
2016-09-08 11:22:21 -07:00
Daniel Nephin
6af6a3a538 Move holdHijackConnection to the container package.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-09-08 12:58:06 -04:00
Daniel Nephin
31d8c27e70 Move container util methods to the container package.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-09-08 12:38:52 -04:00
Daniel Nephin
bec81075bf Extract input stream into a new type.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-09-08 12:34:55 -04:00
Daniel Nephin
a0ab33124a Extract stream output handling to a new type.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-09-08 12:33:41 -04:00
Jana Radhakrishnan
99a98ccc14 Add support for docker run in swarm mode overlay
This PR adds support for running regular containers to be connected to
swarm mode multi-host network so that:
    - containers connected to the same network across the cluster can
      discover and connect to each other.
    - Get access to services(and their associated loadbalancers)
      connected to the same network

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-09-07 21:20:41 -07:00
Michael Crosby
7c36a1af03 Move engine-api client package
This moves the engine-api client package to `/docker/docker/client`.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-09-07 11:05:58 -07:00
Michael Crosby
91e197d614 Add engine-api types to docker
This moves the types for the `engine-api` repo to the existing types
package.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-09-07 11:05:58 -07:00
Aaron Lehmann
86124ca04b Merge pull request #23100 from runcom/fix-stores
support legacy registries in exernal stores
2016-09-07 09:44:41 -07:00
Brian Goff
6168e98a13 Merge pull request #26115 from yongtang/08292016-info-registry-mirrors
Add registry mirrors information in the output of `docker info`
2016-09-07 11:37:36 -04:00
Daniel Nephin
20607e2cc2 Merge pull request #26269 from yuexiao-wang/remove-option
Remove the option for the command service rm
2016-09-07 11:31:11 -04:00
Antonio Murdaca
67d752ac55
support legacy registries in exernal stores
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-09-07 09:45:42 +02:00
Stephen J Day
084ff6dc6d
api/client/node: correct ordering in context argument
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2016-09-06 17:04:43 -07:00
Vincent Demeester
5c6b54c278 Merge pull request #26282 from mstanleyjones/26280_fix_pretty_print
`docker node inspect <node> --pretty`  needs an extra newline at the end
2016-09-06 16:04:55 +02:00
allencloud
2087f94df5 correct docker volume ls subcommand description
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-09-06 17:18:41 +08:00
Yong Tang
b9e46235fa Fix incorrect help output in docker network ls
As is raised in 26312, in `docker network ls`, the help output was
mistaken to `volume names`:
```
-q, --quiet Only display volume names
```

This fix changes the help output to:
```
-q, --quiet Only display network IDs
```

This fix also updates the documentation in:
`docs/reference/commandline/network_ls.md`

This fix fixes 26312.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-09-05 08:24:22 -07:00
Brian Goff
93a8b5c42b Merge pull request #26279 from miaoyq/delete-a-useless-funtion
delete a function which isn't used in the project
2016-09-03 13:36:37 -04:00
Vincent Demeester
c73fae2352 Merge pull request #26290 from tonistiigi/govet17
Fix govet for go1.7
2016-09-03 19:27:19 +02:00
Tonis Tiigi
7a8c7b47cf Fix govet for go1.7
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-09-02 19:07:54 -07:00
Misty Stanley-Jones
341489f150 'docker node inspect <node> --pretty' needs an extra newline at the end
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
2016-09-02 11:15:00 -07:00
Yanqiang Miao
81849600fc delete a function which isn't used in the project
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
2016-09-02 22:54:19 +08:00
yuexiao-wang
1016cbb642 Remove the option for the command service rm
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2016-09-02 17:23:59 +08:00
Yong Tang
a79a27412d Fix issue in docker import -c with quoted flags
This fix tries to address the issue in 26173 where `docker import -c`
with quoted flags returns an error.

The issue was that in `api/client/image/import.go` the flag
`--change/-c` was handled by `StringSliceVarP` which does not handle
the quote well.

The similiar issue was enountered for 23309 (`docker commit`).

This fix takes the same approach as 23309 where `StringSliceVarP`
was replaced with `VarP` and `opts.ListOpts`.

An integration test has been added to cover the changes.

This fix fixes 26173.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-09-01 16:28:22 -07:00
Justin Cormack
8ccac1ad4d Merge pull request #26200 from runcom/engine-api-vendor
vendor docker/engine-api@f9cef59044
2016-09-01 10:51:34 +01:00
zhouhao
61c8b3380f Modify rename function usage
Signed-off-by: zhouhao <zhouhao@cn.fujitsu.com>
2016-09-01 14:48:02 +08:00
Antonio Murdaca
8f7a8c75ae
vendor docker/engine-api@f9cef59044
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-08-31 22:39:13 +02:00
Vincent Demeester
6ac30e57d0 Merge pull request #26191 from runcom/fix-unknownflag-exit-code
api: client: container: update: fix help text
2016-08-31 21:15:51 +02:00
Antonio Murdaca
c2c2617534
api: client: container: update: fix help text
Before:

$ docker update --cpu-period
Status: flag needs an argument: --cpu-period
See 'docker update --help'., Code: 125

After:

$ docker update --cpu-period
flag needs an argument: --cpu-period
See 'docker update --help'.

Also remove flagErrorFunc function which isn't needed anymore.

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-08-31 12:46:40 +02:00
yuexiao-wang
b8af6b579b Miss the options in some commands
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2016-08-31 14:18:41 +08:00
Arnaud Porterie
ec82819cc9 Merge pull request #26140 from yuexiao-wang/modify-usage
Modify options for the command plugin install
2016-08-31 00:04:45 +00:00
Vincent Demeester
19aee54926 Merge pull request #26145 from allencloud/update-command-description
update command description
2016-08-30 22:16:57 +02:00
Yong Tang
0f6acff796 Add registry mirrors information in the output of docker info
This fix tries to add the registry mirrors information in the output
of `docker info`.

In our active deployment, we use registry mirrors to help speeding
up the `docker pull`. In the current output of `docker info`,
registry mirrors is not present though it is available in `/info` API.

I think it makes sense to add the registry mirrors to `docker info`,
similiar to insecure registries.

This fix adds the registry mirrors to the output of `docker info`:
```
Registry Mirrors:
 https://192.168.1.2/
 http://registry.mirror.com:5000/
```

An integration test has been added to cover the changes.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-08-30 09:05:24 -07:00
Anusha Ragunathan
5bd14f88cd Merge pull request #26134 from lixiaobing10051267/masterDockerExec
Modify use of docker exec command in exec.go
2016-08-30 08:27:02 -07:00
allencloud
123ce0e4be update command description
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-08-30 23:07:42 +08:00
lixiaobing10051267
26bd3e8b11 Modify usage of docker exec command in exec.md
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>

Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
2016-08-30 22:14:55 +08:00
yuexiao-wang
d08886618e Modify options for the command plugin install
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2016-08-30 18:45:06 +08:00
allencloud
b13f5dfd13 make node ps default to self in swarm node
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-08-30 17:34:16 +08:00
John Howard
c8ce0856b7 Fix golint errors in api
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-08-29 13:36:16 -07:00
Brian Goff
d09c04a667 Merge pull request #25317 from yongtang/25304-docker-service-create-group
Support `--group` in `docker service create`
2016-08-29 10:27:31 -04:00
Vincent Demeester
bf0077c138 Merge pull request #25990 from vieux/plugin_inspect
add -f to plugin inspect
2016-08-28 17:03:40 +02:00
Cao Weiwei
cdcf7b78fc Fix typo
Signed-off-by: Cao Weiwei <cao.weiwei30@zte.com.cn>
2016-08-28 17:01:22 +08:00
Arnaud Porterie
9ea28ea894 Merge pull request #26055 from mavenugo/ndn
Support container disconnect for non-existing network
2016-08-28 01:48:02 +00:00
Yong Tang
b31969ee36 Support --group-add and --group-rm in docker service create/update
This fix tries to address the issue raised in 25304 to support
`--group-add` and `--group-rm` in `docker service create`.

This fix adds `--group-add` to `docker service create` and `docker service update`,
adds `--group-rm` to `docker service update`.

This fix updates docs for `docker service create` and `docker service update`:
1. Add `--group-add` to `docker service create` and `docker service update`
2. Add `--group-rm` to `docker service update`

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-08-27 11:54:05 -07:00
Madhu Venugopal
05a3f2666e Support container disconnect for non-existing network
There are cases such as migrating from classic overlay network to the
swarm-mode networking (without kv-store), such a mechanism to allow
disconnecting a container even when a network isnt available will be
useful.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-08-26 16:48:52 -07:00
Tibor Vass
ed0dff8f16 Merge pull request #25424 from vieux/enabled
replace active by enabled for consistency in plugins
2016-08-26 15:22:41 -07:00
Alexander Morozov
bdadcfc1bb Merge pull request #25861 from WeiZhang555/wait-remove-for-start
Using waitExitOrRemoved for `docker start`
2016-08-26 13:36:56 -07:00
Vincent Demeester
5168c93419 Merge pull request #23830 from ardnaxelarak/23345_remove_name_from_volume_create
remove --name flag from volume create
2016-08-26 21:52:07 +02:00
Arnaud Porterie
6e85b81df2 Merge pull request #23614 from icecrime/inspect_services
Allow `docker inspect` on all types
2016-08-26 18:45:23 +00:00
Tõnis Tiigi
e875370af8 Merge pull request #25650 from pwzgorilla/master
replace `handleWithGlobalMiddlewares` with `handlerWithGlobalMiddlewa…
2016-08-26 09:51:51 -07:00
mgniu
c5ecf1e6fe change comment
Signed-off-by: mgniu <mgniu@dataman-inc.com>
2016-08-26 18:30:41 +08:00
Victor Vieux
63a19edcb1 add -f to plugin inspect
Signed-off-by: Victor Vieux <vieux@docker.com>

Signed-off-by: Victor Vieux <vieux@docker.com>
2016-08-25 22:40:05 -07:00
Victor Vieux
cf4e268115 replace active by enabled for consistency in plugins
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-08-25 20:42:49 -07:00
Arnaud Porterie (icecrime)
3db9f7afce
Refactor docker inspect to work on all types
Signed-off-by: Arnaud Porterie (icecrime) <arnaud.porterie@docker.com>
2016-08-25 16:29:08 -07:00
Kara Alexandra
ba3f0bf0e7 Add option to specify name without --name in volume create
Signed-off-by: Kara Alexandra <kalexandra@us.ibm.com>
2016-08-25 14:20:06 -07:00
Daniel Nephin
14712f9ff0 Remove old cli framework.
Also consolidate the leftover packages under cli.
Remove pkg/mflag.
Make manpage generation work with new cobra layout.
Remove remaining mflag and fix tests after rebase with master.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-08-25 13:09:04 -04:00
Daniel Nephin
31bf9ca0c8 Update unit tests for new cobra root command.
Cleanup cobra integration
Update windows files for cobra and pflags
Cleanup SetupRootcmd, and remove unnecessary SetFlagErrorFunc.
Use cobra command traversal

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-08-25 13:09:04 -04:00
Daniel Nephin
0452ff5a4d Convert docker root command to use pflag and cobra
Fix the daemon proxy for cobra commands.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-08-25 13:09:03 -04:00
Zhang Wei
b8464c1c9b Using waitExitOrRemoved for docker start
Currently start command will invoke getExitCode - which is based on
Inspect API - to get returned exit code after container exits.
There's two race conditions here:

if container is started with Restart Policy, there's chance that the
container is restarted quickly before it calls getExitCode, under such
circumstance, the exit code is wrong.

if container is started with --rm, it's possible that container is
removed before getExitCode, in this situation, you can't get correct
exit code either.

Replace getExitCode with waitExitOrRemoved can solve this problem.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-08-26 00:16:49 +08:00
Brian Goff
7250dd4222 Merge pull request #26013 from ShawnHe711/correct-nit-in-command-annotation
correct command annotation
2016-08-25 10:39:42 -04:00
shawnhe
b642282990 correct command annotation
Signed-off-by: shawnhe <shawnhe@shawnhedeMacBook-Pro.local>
2016-08-25 21:29:59 +08:00
allencloud
d527149064 fix rm plugin arg number to be min 1
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-08-25 20:53:49 +08:00
Aaron Lehmann
3b374a25f2 Merge pull request #25582 from anusha-ragunathan/detect-plugin-mediatype
Make `docker pull` detect plugin content and error out.
2016-08-22 09:29:51 -07:00
Anusha Ragunathan
9b6dcc8b9d Make docker pull detect plugin content and error out.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-08-20 12:54:35 -07:00
Vincent Demeester
09b929083d Merge pull request #23436 from yongtang/23367-out-of-band-volume-driver-deletion
Add `--force` in `docker volume rm` to fix out-of-band volume driver deletion
2016-08-19 22:09:57 +02:00
Sebastiaan van Stijn
80798d28d3 Merge pull request #25791 from lixiaobing10051267/masterSwarmJoinToken
Modify usage of docker swarm join-token command
2016-08-19 21:44:42 +02:00
Vincent Demeester
54ed156879
Remove -run flag from commit command.
This flag has been deprecated in version below 1.10 so it's safe to
remove now, according to our deprecation policy.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-08-19 13:14:03 +02:00
lixiaobing10051267
9123ca546a Modify usage of docker swarm join-token command
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
2016-08-19 09:44:22 +08:00
Yong Tang
6c5c34d50d Add --force in docker volume rm to fix out-of-band volume driver deletion
This fix tries to address the issue in raised #23367 where an out-of-band
volume driver deletion leaves some data in docker. This prevent the
reuse of deleted volume names (by out-of-band volume driver like flocker).

This fix adds a `--force` field in `docker volume rm` to forcefully purge
the data of the volume that has already been deleted.

Related documentations have been updated.

This fix is tested manually with flocker, as is specified in #23367.
An integration test has also been added for the scenario described.

This fix fixes #23367.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-08-18 18:01:25 -07:00
Kanstantsin Shautsou
57db05cb10
Don't confuse with empty body
It fails with any (even empty) json request body.

Signed-off-by: Kanstantsin Shautsou <kanstantsin.sha@gmail.com>
2016-08-17 02:01:04 +03:00
Brian Goff
37302bbb3f Merge pull request #25721 from cpuguy83/revendor_engine-api
revendor engine-api
2016-08-16 17:18:43 -04:00
Brian Goff
6d98e344c7 revendor engine-api
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-08-16 14:16:12 -04:00
Tõnis Tiigi
9a3e7d9e34 Merge pull request #25701 from WeiZhang555/update-conflict-rm-restart
Forbid update restart policy of container with AutoRemove flag
2016-08-16 10:37:45 -07:00
Michael Crosby
0c8b0faef8 Merge pull request #25337 from jhorwit2/jah/25332
Add --no-trunc to service/node/stack ps output
2016-08-16 09:25:45 -07:00
Josh Horwitz
204c4d39d3 Add --no-trunc to service/node/stack ps output
Signed-off-by: Josh Horwitz <horwitzja@gmail.com>
2016-08-16 10:19:11 -04:00
Sebastiaan van Stijn
dcdf2b404e Merge pull request #25720 from thaJeztah/add-missing-label-filter-docs
Add missing docs for volume ls filter=label
2016-08-16 13:50:56 +02:00
Sebastiaan van Stijn
348f6529b7 Merge pull request #23808 from AkihiroSuda/formatinfo
add `--format` flag to `docker info`
2016-08-16 12:04:26 +02:00
Zhang Wei
4754c64ab5 Forbid update restart policy of container with AutoRemove flag
"--restart" and "--rm" are conflict options, if a container is started
with AutoRemove flag, we should forbid the update action for its Restart
Policy.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-08-16 15:36:13 +08:00
Akihiro Suda
dc38c9a047 add --format flag to docker info
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2016-08-16 04:03:52 +00:00
Yong Tang
b4ba575a28 Suppress verbose "Sending build context" messages in non tty scenarios
This fix tries to address the issue raised in 25661 where verbose
"Sending build context" messages were not suppressed in non tty (e.g. log file)
sencarios.

This fix suppress the "Sending build context" message (other than the last one)
if the output is not a tty. The last update of the "Sending build context"
message is still sent to the output.

This fix has been tested manually:
```
docker build -t tmp . > build.log
```
The output is (only one "Sending build context"):
```
Sending build context to Docker daemon 249.4 MB
Step 1 : FROM busybox
 ---> 2b8fd9751c4c
Step 2 : RUN echo 'test'
 ---> Using cache
 ---> 7db298b6c493
Successfully built 7db298b6c493
```

This fix fixes 25661.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-08-15 18:35:05 -07:00
Sebastiaan van Stijn
5171b83495
Add missing docs for volume ls filter=label
This filter option was added in be045ee2da,
but didn't update the documentation and
man pages.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-08-15 17:42:16 +02:00
Michael Friis
f9443aa2a5 tweak logout message
Signed-off-by: Michael Friis <friism@gmail.com>
2016-08-12 17:00:06 -07:00
Michael Crosby
2a10899c16 Merge pull request #25216 from aanand/deploy-error-when-not-in-swarm-mode
Better error on 'docker deploy' when not in Swarm mode
2016-08-12 14:17:47 -07:00
Michael Crosby
a86b2376a0 Merge pull request #25070 from yongtang/24881-label-containers-with-stack-name
Label containers with stack name when deploying stack/bundle
2016-08-12 10:20:06 -07:00
Vincent Demeester
64f83cee43 Merge pull request #25568 from thaJeztah/enhance-string-truncate
Implement stringutils.Ellipsis()
2016-08-12 17:19:50 +02:00
Sebastiaan van Stijn
d8240c8e27 Merge pull request #25564 from coolljt0725/fix_inspect_network
Fix inspect network show gateway with mask
2016-08-12 11:11:09 +02:00
Vincent Demeester
353af0b3ec Merge pull request #25557 from yongtang/25529-image-load-api
Return `application/json` for image/load API (quiet=1)
2016-08-12 11:07:43 +02:00
mgniu
e743ab0882 replace handleWithGlobalMiddlewares with handlerWithGlobalMiddlewares
Signed-off-by: mgniu <mgniu@dataman-inc.com>
2016-08-12 10:53:11 +08:00
Tibor Vass
3a7e90c743 Remove --network-add and --network-rm flags from service update
These flags were not supported (daemon returns an error), and it was an
oversight. They were not present in completion scripts.

Signed-off-by: Tibor Vass <tibor@docker.com>
2016-08-11 19:37:21 -07:00
Lei Jitang
096bb5fb07 Fix inspect network show gateway with mask
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-08-11 21:08:54 -04:00
Brian Goff
52286b402e Merge pull request #25524 from WeiZhang555/debug-win2lin
Bugfix: client hangs after run container
2016-08-11 15:43:00 -04:00
Vincent Demeester
49cd1680f0 Merge pull request #25428 from yongtang/25375-idempotent-service-update-publish-add
Fix issue in `service update --publish-add`
2016-08-11 20:11:33 +02:00
Zhang Wei
eadcb99619 Refactor waitExitOrRemoved by mlaventure
Reduce complexity of waitExitOrRemoved.

Signed-off-by: mlaventure
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-08-12 00:50:07 +08:00
Sebastiaan van Stijn
51dc35cf23
Implement stringutils.Ellipsis()
This patch implements an Ellipsis utility to
append an ellipsis (...)  when truncating
strings in output.

It also fixes the existing Truncate() utility
to be compatible with unicode/multibyte characters.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-08-11 14:14:06 +02:00
Vincent Demeester
ed1a313d8f Merge pull request #25556 from vieux/plugin_description
add description in docker plugin ls
2016-08-11 14:08:50 +02:00
Yong Tang
b487497cd2 Idempotent service update --publish-add
This fix tries to address the issue raised in 25375 where
`service update --publish-add` returns an error if the exact
same value is repeated (idempotent).

This fix use a map to filter out repeated port configs so
that `--publish-add` does not error out.

An integration test has been added.

This fix fixes 25375.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-08-10 18:03:43 -07:00
Victor Vieux
16d5fbfd9a add description in docker plugin ls
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-08-10 13:06:18 -07:00
Alexander Morozov
64605d709f Merge pull request #23951 from allencloud/defer-os-file-close
add defer file.Close to avoid potential fd leak
2016-08-10 11:07:15 -07:00
Vincent Demeester
59ca493121 Merge pull request #25427 from yongtang/25404-service-update-env-add
Fix `service update --env-add` issue
2016-08-10 14:07:05 +02:00
Zhang Wei
a422813113 Bugfix: client hangs after run container
New codes introduced a new method to wait container's exit code and
removal via Events API, but it specified a "since" filter based on
client side clock, which sometimes isn't synced up with daemon's clock,
hence leads the client to hang on waiting container's exit status.

This commit brings the Events call before start, and removes the time
filter, so that it can catch daemon events correctly without care of the
clock issue.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-08-10 09:36:06 +08:00
Yong Tang
2f27632cde Return application/json for image/load API (quite=1)
This fix tries to address the issue raised in 25529 wehre the
image/load API returns `application/json` for quiet=0 and
`text/plain` for quite=1.

This fix makes the change so that `application/json` is returned
for both quiet=0 and quite=1.

This fix has been tested manually.

This fix fixes 25529.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-08-09 17:55:42 -07:00
allencloud
0ead624473 add defer file.Close to avoid potential fd leak
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-08-10 08:36:09 +08:00
Sebastiaan van Stijn
41d580c7a6 Merge pull request #25512 from diogomonica/add-created-at
Adding Joined at to node inspect --pretty
2016-08-09 12:56:32 +02:00
Yong Tang
c6de8add5f Fix service update --env-add issue
This fix tries to address the issue in 25404 where updating environmental
variable in `service update --env-add` will not work.

The issue is because `--env-add` will only append the env, not update if
the same env already exist.

This fix tracks the env variable with a map and update if the variable
is the same.

An integration test has been added.

This fix fixes 25404.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-08-08 19:04:56 -07:00
Diogo Monica
d1244abc5c Adding Joined at to node inspect
Signed-off-by: Diogo Monica <diogo.monica@gmail.com>
2016-08-08 16:23:10 -07:00
Zhang Wei
6dd8e10d6e Wait container's removal via Events API
If AutoRemove is set, wait until client get `destroy` events, or get
`detach` events that implies container is detached but not stopped.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-08-08 22:46:53 +08:00
Zhang Wei
3c2886d8a4 Move --rm to daemon side
`--rm` is a client side flag which caused lots of problems:
1. if client lost connection to daemon, including client crash or be
killed, there's no way to clean garbage container.
2. if docker stop a `--rm` container, this container won't be
autoremoved.
3. if docker daemon restart, container is also left over.
4. bug: `docker run --rm busybox fakecmd` will exit without cleanup.

In a word, client side `--rm` flag isn't sufficient for garbage
collection. Move the `--rm` flag to daemon will be more reasonable.

What this commit do is:
1. implement a `--rm` on daemon side, adding one flag `AutoRemove` into
HostConfig.
2. Allow `run --rm -d`, no conflicting `--rm` and `-d` any more,
auto-remove can work on detach mode.
3. `docker restart` a `--rm` container will succeed, the container won't
be autoremoved.

This commit will help a lot for daemon to do garbage collection for
temporary containers.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-08-08 22:46:53 +08:00
Vincent Demeester
8615c8b52d Merge pull request #25455 from abronan/improve_cli_promote_demote_output
swarm: improve cli output on node promote/demote for unchanged role
2016-08-06 09:12:46 +02:00
Alexandre Beslic
5479df79c7 swarm: improve cli output on node promote/demote for unchanged role
As of now promoting (or demoting) a node that has its role
left unchanged will always print a successful message.

This PR fixes the issue by matching the behavior on swarmkit's
swarmctl command and printing a message when desired role is
the current role of the node.

As a result this also avoids calling update when it is not
necessary.

Signed-off-by: Alexandre Beslic <alexandre.beslic@gmail.com>
2016-08-05 15:51:32 -07:00
Dave Tucker
0e1fe4516f cli: service inspect - Null check for UpdateConfig
Fixes #25453

Signed-off-by: Dave Tucker <dt@docker.com>
2016-08-05 22:42:14 +01:00
Vincent Demeester
049210ce46 Merge pull request #24703 from jhorwit2/jah/#24696
Fixes #24696 - Fixes Size showing 0 in formatted ps output
2016-08-05 21:28:45 +02:00
Vincent Demeester
1ccd9d3137 Merge pull request #23475 from vdemeester/add-format-flag-to-network-and-volume-ls
Add format flag to network and volume ls
2016-08-05 15:17:45 +02:00
Vincent Demeester
85428a1a53 Merge pull request #25096 from vieux/docker_plugin_remove_force
Add --force to docker plugin remove
2016-08-05 14:45:05 +02:00
Victor Vieux
0016b331da Add --force to docker plugin remove
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-08-04 15:55:45 -07:00
Vincent Demeester
7c8780ea63
Refactor dockerCli *Format to ConfigFile call
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-08-04 15:00:00 +02:00
Vincent Demeester
a488ad1a09
Add volume --format flag to ls
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-08-04 14:59:55 +02:00
Vincent Demeester
a8aaafc4a3
Add network --format flag to ls
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-08-04 14:59:51 +02:00
Vincent Demeester
e4fdbbc00b
Refactor api/client/formatter files
- Create container.go and image.go for specific context code
- Keep common code in formatter.go and custom.go

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-08-04 14:59:45 +02:00
Daniel Nephin
fab2a3dc82 Ignore 'not a swarm error' when inspecting a task.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-08-03 12:22:07 -04:00
Daniel Nephin
851c388ad9 Convert inspect to cobra.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-08-03 10:36:47 -04:00
Tonis Tiigi
e3917c76ce Mask join tokens in daemon logs
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-08-02 15:15:23 -07:00
Brian Goff
404705fd8e Merge pull request #25345 from dperny/fix-service-inspect-pretty
Fix missing newline in service inspect --pretty
2016-08-02 17:50:28 -04:00
Sebastiaan van Stijn
10ae908bfa Merge pull request #25159 from diogomonica/adding-force-to-node-remove
Adding force to node rm
2016-08-02 22:49:15 +02:00
Drew Erny
02ebaf364f Fix missing newline in service inspect --pretty
Printing off networks as part of --pretty was missing a newline, causing
the next thing printed to be concatenated onto the end of the line.
Added an empty println after all networks are printed.

Signed-off-by: Drew Erny <drew.erny@docker.com>
2016-08-02 13:27:35 -07:00
Vincent Demeester
3d28cdd2f5 Merge pull request #25308 from thaJeztah/join-token-refactor
Improve swarm join-token instructions
2016-08-02 18:57:37 +02:00
Sebastiaan van Stijn
ebebd41769
Improve swarm join-token instructions
this change improves the instructions for
swarm join-token and swarm init;

- only print the join-token command for workers
  instead of for both managers and workers, to
  prevent users from copying the wrong command.
  An extra line is added to explain how to obtain
  the manager token.
- print a message that a token was rotated
  sucesfully if '--rotate' is used.
- add some extra white-space before / after
  the join commands, to make copy/pasting
  easier.

this change also does some refactoring of join-token;

- move flagname-constants together with other constants
- use variables for selected role ("worker" / "manager")
  to prevent checking for them multiple times, and to
  keep the "worker" / "manager" sting centralized
- add an extra blank line after "join-token" instructions
  this makes it easier to copy, and cleans up the
  code a tiny bit

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-08-02 16:44:02 +02:00
Yong Tang
80a3755a8f Update docs in docker service create/update for flag --user
In `docker service create/update`, flag `--user` actually supports
`uid:gid` (same as `docker run`). However, this is not reflected
in the help and documentation yet.

This fix updates docs in `docker service create/update` to change
the description to `Username or UID (format: <name|uid>[:<group|gid>])`.

The help message output has also been updated.

This fix is related to 25304.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-08-02 07:01:16 -07:00
Diogo Monica
a327c231b5 Add --force to node removal
Signed-off-by: Diogo Monica <diogo.monica@gmail.com>
2016-08-01 18:55:58 -07:00
Brian Goff
8f78dae4e3 Merge pull request #25204 from yongtang/25195-docker-info-ca-configuration
Output external CAs in swarm mode with `docker info`
2016-08-01 21:34:00 -04:00
Yong Tang
55d05fc055 Replace "workdir' with const, same as other flags in service create
This is a minor fix that tries to replace `"workdir"` with const in `service create`.

Since `"workdir"` is the only string not defined as const in `func addServiceFlags()`,
I think it makes sense to replace `"workdir"` with a const to be consistent.

The flag `"workdir"` in `service update` has also been replaced.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-08-01 11:45:28 -07:00
Yong Tang
995128e9eb Output external CAs in swarm mode with docker info
This fix tries to address the issue raised in 25195 where external
CA configurations are not present in `docker info`.

This fix adds the output of external CAs in `docker info` in swarm
mode.

The test is done manually with:
```
docker run -p 8888:8888 -e CXFSSL_ADDRESS=0.0.0.0 -d fabric8/cfssl
docker swarm init --external-ca protocol=cfssl,url=http://172.17.0.2:8888
```

The `docker info` output:
```
 Managers: 1
 Nodes: 1
 Orchestration:
  Task History Retention Limit: 5
 Raft:
  Snapshot interval: 10000
  Heartbeat tick: 1
  Election tick: 3
 Dispatcher:
  Heartbeat period: 5 seconds
 CA configuration:
  Expiry duration: 3 months
  External CAs:
    cfssl: https://172.17.0.2:8888
```

This fix fixes 25195.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-07-30 09:14:16 -07:00
allencloud
6c5988ed8c update command description in CLI
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-07-31 00:06:18 +08:00
allencloud
ac13162464 uppercase output in docker info related to swarm mode
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-07-30 10:14:44 +08:00
Brian Goff
6bf2db574b Merge pull request #24365 from xianlubird/bug/network-list
Change buildEndpointResource params avoid repeat visits resource
2016-07-29 14:54:05 -04:00
Aanand Prasad
aab92ec7ec Better error on 'docker deploy' when not in Swarm mode
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-07-29 11:12:20 +01:00
Vincent Demeester
3d42bf5f12 Merge pull request #23759 from AkihiroSuda/cobraexec
Migrate exec command to cobra
2016-07-29 07:41:02 +02:00
Vincent Demeester
faf9dac22c Merge pull request #24986 from mlaventure/add-live-restore-to-info
Add live restore to info
2016-07-29 07:37:56 +02:00
Akihiro Suda
9d9dff3d0d Migrate exec command to cobra
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2016-07-29 02:10:36 +00:00
Kenfe-Mickael Laventure
189aaf8aea Add live-restore state to docker info output
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-07-28 17:10:40 -07:00
Aaron Lehmann
614ad95fbb service ls: Show tasks from nodes that are not down, not only "ready" nodes
Currently, the counter only shows tasks on READY nodes. It's more
correct to also count nodes in the other states except DOWN, because
the tasks assocated with those nodes are still assumed to be running for
orchestration purposes. One example of when this could matter is during
a leader failover when agents are in the process of reconnecting.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-07-28 11:44:28 -07:00
Arnaud Porterie
95ede360e8 Merge pull request #25013 from dnephin/remove-extraneous-aliases
Remove extraneous mount cli aliases
2016-07-27 22:51:56 +00:00
Daniel Nephin
39a3700c01 Remove extraneous mount aliases.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-07-27 15:05:31 -04:00
Stephen J Day
0aa4e1e689
cli: docker service|node|stack ps instead of tasks
Rather than conflict with the unexposed task model, change the names of
the object-oriented task display to `docker <object> ps`. The command
works identically to `docker service tasks`. This change is superficial.

This provides a more sensical docker experience while not trampling on
the task model that may be introduced as a top-level command at a later
date.

The following is an example of the display using `docker service ps`
with a service named `condescending_cori`:

```
$ docker service ps condescending_cori
ID                         NAME                  SERVICE             IMAGE   LAST STATE              DESIRED STATE  NODE
e2cd9vqb62qjk38lw65uoffd2  condescending_cori.1  condescending_cori  alpine  Running 13 minutes ago  Running        6c6d232a5d0e
```

The following shows the output for the node on which the command is
running:

```console
$ docker node ps self
ID                         NAME                  SERVICE             IMAGE   LAST STATE              DESIRED STATE  NODE
b1tpbi43k1ibevg2e94bmqo0s  mad_kalam.1           mad_kalam           apline  Accepted 2 seconds ago  Accepted       6c6d232a5d0e
e2cd9vqb62qjk38lw65uoffd2  condescending_cori.1  condescending_cori  alpine  Running 12 minutes ago  Running        6c6d232a5d0e
4x609m5o0qyn0kgpzvf0ad8x5  furious_davinci.1     furious_davinci     redis   Running 32 minutes ago  Running        6c6d232a5d0e
```

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2016-07-27 11:06:42 -07:00
Yong Tang
796636716d Label containers with stack name when deploying stack/bundle
This fix tries to address the issue raised in 24881 where
the stack name is not visable when inspecting containers
deployed through stacks.

This fix adds `labelNamespace` (`com.docker.stack.namespace`)
to containers at the client side so that the stack name label
will show up after containers are deployed.

This fix is tested manually:
 - Build the binary with `make DOCKER_EXPERIMENTAL=1`
 - Create a bundle file and deploy with the `docker stack deploy`
 - Verify that `com.docker.stack.namespace` has been
set properly by checking contaners with `docker inspect <ContainerID>`

This fix fixes 24881.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-07-26 11:53:39 -07:00
Vincent Demeester
f0173abd36 Merge pull request #25047 from aaronlehmann/unsafe-flag-updates
service update: Don't assume existing pointers in spec are valid
2016-07-26 10:14:29 +02:00
Tibor Vass
9ee430fcf5 Merge pull request #25042 from tiborvass/carry-24492
Carry 24492: Remove swarm inspect and use info instead
2016-07-26 01:11:37 -07:00
Aaron Lehmann
f9c920a126 service update: Don't assume existing pointers in spec are valid
When updating values in the spec according to CLI flags, don't write
into the existing pointers. They may be nil. Instead, update them to
point to the new value we're writing.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-07-25 23:56:50 -07:00
Tibor Vass
8ad9438ede Address some displaying issues in docker info
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:07:39 -07:00
Vincent Demeester
e6923f6d75 Remove swarm inspect and use info instead
Remove the swarm inspect command and use docker info instead to display
swarm information if the current node is a manager.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-07-25 20:31:10 -07:00
Tibor Vass
e462b4507a Prevent panic on update --container-label-add
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 19:17:06 -07:00
Vincent Demeester
4031d70d1b Add container labels to service create/update
Swarm mode makes it possible through the API to set labels to containers
but not through command line. This tries to fix it.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-07-25 18:57:02 -07:00
Tibor Vass
afac3361dc Merge pull request #25023 from cpuguy83/25022_fix_label_panic
fix panic on --label-add
2016-07-25 18:13:15 -07:00