Commit graph

2525 commits

Author SHA1 Message Date
John Howard
f811d5b128 Windows: Require REST 1.25 or later
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-10-31 14:33:59 -07:00
Daniel Nephin
181562c2e5 Generate ContainerWait response from the swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-10-31 11:19:53 -04:00
Daniel Nephin
2732b8a9bb generate AuthResponse type from swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-10-31 11:16:03 -04:00
Daniel Nephin
f196cf6a09 Generate container update response from swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-10-31 11:16:02 -04:00
Daniel Nephin
c8d5e7203e Use IDResponse for container create response.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-10-31 11:16:02 -04:00
Daniel Nephin
01883c136d Add an IDResponse type
Generated from a swagger spec and use it for container exec response

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-10-31 11:16:02 -04:00
Daniel Nephin
bad849fc82 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
29df3bdb11 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
8f81bb92a3 Update to inline comments.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-10-31 11:13:41 -04:00
Daniel Nephin
52a4737319 Cleanup network swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-10-31 11:13:41 -04:00
Daniel Nephin
5c2498fd3c Generate VolumesCreateRequest from the swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-10-31 11:13:41 -04:00
Daniel Nephin
bc75738545 Generate ErrorResponse struct from swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-10-31 11:13:41 -04:00
Daniel Nephin
84a39c0830 Cleanup volume swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-10-31 11:13:41 -04:00
Daniel Nephin
d459e83b1c Generate VolumeList response from the swagger spec
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-10-31 11:13:41 -04:00
Qiang Huang
e6866492c4 Fix bunch of typos
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-10-29 15:03:26 +08:00
Vincent Demeester
515e5dade7 Merge pull request #24698 from jhorwit2/jah/clist-health-filter-format
Fixes #24022 - Adds container health support to docker ps filter/format
2016-10-29 06:56:06 +02:00
Vincent Demeester
f860289131 Merge pull request #27369 from cezarsa/hc
Add --health-* flags to service create and update
2016-10-28 21:59:52 +02:00
Josh Horwitz
1a149a0ea5 Adds container health support to docker ps filter
Signed-off-by: Josh Horwitz <horwitzja@gmail.com>
2016-10-28 15:43:04 -04:00
Michael Crosby
b57f321a4a Merge pull request #26709 from boucher/checkpoint-dir
Allow providing a custom storage directory for docker checkpoints
2016-10-28 11:12:44 -07:00
Cezar Sa Espinola
7bd2611789
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
bd7d51292c Allow providing a custom storage directory for docker checkpoints
Signed-off-by: boucher <rboucher@gmail.com>
2016-10-28 07:56:05 -04:00
Akihiro Suda
18768fdc2e api: add TypeTmpfs to api/types/mount
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2016-10-28 08:38:32 +00:00
Kenfe-Mickaël Laventure
4d2e258531 Merge pull request #26718 from ncdc/add-logs-to-container-attach-options
Add Logs to ContainerAttachOptions
2016-10-27 13:32:50 -07:00
Erik St. Martin
56f77d5ade 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
62ff3e9083 Merge pull request #27702 from tonistiigi/net-builder0
add --network option for docker build
2016-10-25 21:50:33 -07:00
sandyskies
60813af7ae 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
7e24c16086 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
Kenfe-Mickael Laventure
7781a1bf0f Make experimental a runtime flag
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-10-24 15:20:01 -07:00
Vincent Demeester
9058ec3be5 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
b54a1d83fa Merge pull request #27630 from runcom/fix-info-route
api/server/router/system: fix info versioning
2016-10-21 18:58:10 -07:00
Aaron Lehmann
c9fdf9abf8 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
Antonio Murdaca
63b5a37203
api/server/router/system: fix info versioning
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-10-21 12:32:23 +02:00
Daniel Nephin
7e7d0ab5e6 Update volume type and regenerate types
generation fixed some comments.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-10-20 13:31:32 -07:00
Daniel Nephin
6f7b69b63f Generate plugin types from the swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-10-20 13:24:23 -07:00
Daniel Nephin
02e1ffd76c Add whitespace and create a script to run generation
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-10-20 13:24:23 -07:00
Daniel Nephin
b06c352783 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
Daniel Nephin
f06d8d6db9 Generate api/types:Port from swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-10-20 13:24:23 -07:00
Daniel Nephin
0243936d92 Add swagger.yaml
Generate Volume type from the swagger.yaml
Add makefile target for generating the models

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-10-20 13:24:23 -07:00
Antonio Murdaca
1808348136
record pid of exec'd process
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-10-20 17:06:11 +02:00
Yong Tang
9ce8aac55e Show volume options for docker volume inspect
This fix tries to address the issue raised in 25545 where
volume options at the creation time is not showed up
in `docker volume inspect`.

This fix adds the field `Options` in `Volume` type and
persist the options in volume db so that `volume inspect`
could display the options.

This fix adds a couple of test cases to cover the changes.

This fix fixes 25545.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-10-20 05:14:27 -07:00
Andy Goldstein
fc8097f957 Add Logs to ContainerAttachOptions
Signed-off-by: Andy Goldstein <agoldste@redhat.com>
2016-10-19 11:39:00 -04:00
Akihiro Suda
b5bb7de5d2 add creation timestamp to docker network inspect
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2016-10-19 06:38:39 +00:00
Aaron Lehmann
6d4b527699 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
Aaron Lehmann
67bebd6d81 API changes for service rollback and failure threshold
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-10-18 10:09:30 -07:00
Yong Tang
cc703784f3 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
Aaron Lehmann
245bd4c3d2 Merge pull request #27365 from morelena/remove_nil_check
all: remove nil check for slices
2016-10-13 15:27:37 -07:00
Elena Morozova
ace53bbe65 all: remove nil check for slices
Signed-off-by: Elena Morozova <lelenanam@gmail.com>
2016-10-13 13:55:38 -07:00
Elena Morozova
64238fef8c all: replace loop with single append
Signed-off-by: Elena Morozova <lelenanam@gmail.com>
2016-10-13 13:31:52 -07:00
Sebastiaan van Stijn
a7db0a8402 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
d36952749d 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
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