Commit graph

161 commits

Author SHA1 Message Date
Yong Tang
897e69143a Add missing fields in Swagger docs
This fix adds the missing fields of `Hostname`, `OpenStdin`,
`Hosts`, `Groups`, and `Healthcheck` to `ContainerSpec`.
This fix also moves the `Label` in `ContainerSpec` to align with
the definition order.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-02-20 16:06:20 -08:00
Tony Abboud
7a962e4577 Add --add-host for docker build
Signed-off-by: Tony Abboud <tdabboud@hotmail.com>
2017-02-20 17:32:28 -05:00
Sebastiaan van Stijn
b89aff1afa Merge pull request #30898 from allencloud/add-link-query-in-container-rm-api-doc
add link query in container rm api doc
2017-02-18 09:53:51 -08:00
Victor Vieux
47396d6377 Switch to new versioning scheme
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-02-15 23:22:50 -08:00
Vincent Demeester
e8b92f154d Merge pull request #30832 from allencloud/update-swaggeryml-on-cluster-status-code
remove 400 and 404 for get nodes endpoint and add 503 for secret update
2017-02-15 09:45:44 +01:00
Yong Tang
ca020416e4 Add attachable for network object in swagger api docs
This fix adds `Attachable` property for network object
in the documentation of Swagger API docs

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-02-12 14:07:55 -08:00
allencloud
94b880f919 add CheckDuplicate docs and logics in network
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-02-13 00:34:40 +08:00
allencloud
2972b99f1b add link query in container rm api doc
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-02-11 00:17:37 +08:00
Brian Goff
10c0af0835 Merge pull request #30702 from allencloud/update-api-docs-about-filters
add missing filter type in swagger.yml and sort filter type in alphabets
2017-02-09 10:33:49 -05:00
Victor Vieux
6bad3fc9fb bump engine API to 1.27
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-02-08 16:14:58 -08:00
Sebastiaan van Stijn
dea528e8cd Merge pull request #29906 from allencloud/update-events-related-things
update events related doc and swagger.yml
2017-02-08 14:13:37 -08:00
allencloud
5692a7ba3d remove 400 and 404 for get nodes endpoint and add 503 for secret update
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-02-08 23:06:09 +08:00
allencloud
26649de086 add filters for plugin list endpoint in swagger.yml
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-02-08 14:07:20 +08:00
Anusha Ragunathan
124b480967 Merge pull request #30767 from cpuguy83/plugin_upgrade_swagger
Update swagger spec for plugin upgrade
2017-02-07 10:32:40 -08:00
Brian Goff
ae48cd04da Update swagger spec for plugin upgrade
This was added in 03c6949739 but spec was
not updated.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-02-07 11:21:54 -05:00
Vincent Demeester
f3da980a45 Merge pull request #30734 from allencloud/add-400-status-code-for-events-endpoint
add status code 400 for api endpoint /events
2017-02-07 17:02:50 +01:00
Anusha Ragunathan
0113128b2a Merge pull request #30701 from allencloud/add-status-code-404-for-plugin-in-api-doc
add status code 404 for plugin api endpoint enable and disable
2017-02-06 11:53:17 -08:00
allencloud
44bd658913 add expose and publish filter in swagger.yml and CLI docs for docker/master
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-02-04 14:28:14 +08:00
allencloud
da1f05d66d add missing filter type and sort filter type in alphabets
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-02-04 14:25:55 +08:00
allencloud
323f575087 add status code 400 for api endpoint /events
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-02-04 13:40:24 +08:00
Joffrey F
5bec534da5 Parameter name in GetPluginPrivileges is "remote"
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-02-03 18:10:16 -08:00
Brian Goff
03c6949739 Add docker plugin upgrade
This allows a plugin to be upgraded without requiring to
uninstall/reinstall a plugin.
Since plugin resources (e.g. volumes) are tied to a plugin ID, this is
important to ensure resources aren't lost.

The plugin must be disabled while upgrading (errors out if enabled).
This does not add any convenience flags for automatically
disabling/re-enabling the plugin during before/after upgrade.

Since an upgrade may change requested permissions, the user is required
to accept permissions just like `docker plugin install`.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-02-03 16:21:12 -05:00
allencloud
75f7305888 add status code 404 for plugin api endpoint enable and disable
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-02-03 15:13:10 +08:00
Brian Goff
bb0a532fc2 Merge pull request #30203 from allencloud/validate-healthcheck-params-in-daemon-side
validate healthcheck params in daemon side
2017-02-01 21:19:30 -05:00
Alexander Morozov
1d2f5de49a Merge pull request #30162 from yongtang/29972-service-read-only
Add `--read-only` for `service create` and `service update`
2017-01-31 13:20:00 -08:00
Joffrey F
20c5fa3758 Fix typo in swagger.yaml for NetworkPrune operation
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-01-30 18:25:39 -08:00
Yong Tang
499a0dd43e Add --read-only for service create and service update
This fix tries to address the issue raised in 29972 where
it was not possible to specify `--read-only` for `docker service create`
and `docker service update`, in order to have the container's root file
system to be read only.

This fix adds `--read-only` and update the `ReadonlyRootfs` in `HostConfig`
through `service create` and `service update`.

Related docs has been updated.

Integration test has been added.

This fix fixes 29972.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-01-30 12:47:26 -08:00
allencloud
e399c558e6 validate healthcheck params in daemon side
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-01-29 13:35:32 +08:00
allencloud
c81a818b56 add 400 status code for build api
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-01-29 00:07:35 +08:00
Alexander Morozov
a69c4129e0 Merge pull request #28409 from dnephin/swagger-gen-more
Generate more types from the swagger spec
2017-01-26 10:35:34 -08:00
Zhang Wei
827bbe90a0 Fix some typos
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2017-01-19 15:29:28 +08:00
Josh Hawn
1cd5af59bf Add SecretUpdate docs to api/swagger.yaml
Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2017-01-13 09:51:12 -08:00
Vincent Demeester
24e9ac1575 Merge pull request #29206 from ripcurld0/doc_api_update
Specify content type in the build request
2017-01-11 08:41:39 +01:00
Tibor Vass
f265727bdf plugins: rename DeviceCreation to AllowAllDevices
Signed-off-by: Tibor Vass <tibor@docker.com>
2017-01-10 13:50:30 -08:00
Boaz Shuster
b1996728aa Update docs and code to use application/x-tar in the build API
At the "Build image from Dockerfile" section in the API docs
the Content-Type header is missing.
In addition, some parts in the code are still setting the
Content-Type header to application/tar while it was changed
to application/x-tar since 16th September 2015.

Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
2017-01-10 06:40:06 +02:00
allencloud
ffc79bd1b0 update events related doc and swagger.yml
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-01-05 21:40:21 +08:00
Yong Tang
58738cdee3 Add --filter until=<timestamp> for docker container/image prune
This fix is a follow up for comment
https://github.com/docker/docker/pull/28535#issuecomment-263215225

This fix provides `--filter until=<timestamp>` for `docker container/image prune`.

This fix adds `--filter until=<timestamp>` to `docker container/image prune`
so that it is possible to specify a timestamp and prune those containers/images
that are earlier than the timestamp.

Related docs has been updated

Several integration tests have been added to cover changes.

This fix fixes #28497.

This fix is related to #28535.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-01-04 14:16:42 -08:00
Victor Vieux
bcead9282e replace no-remove by sample-volume-plugin in docs
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-03 16:03:48 -08:00
Daniel Nephin
17f9f5abf4 Set expected response headers for Ping.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-01-03 11:47:47 -05:00
Daniel Nephin
16bdbaaa33 Convert ContainerTopOKResponse from swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-01-03 11:47:47 -05:00
Daniel Nephin
8d5f558de0 Generate GraphDriver from spec, and fix up image spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-01-03 11:47:47 -05:00
Daniel Nephin
5988b84e4f Generate ImageDeleteResponse from swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-01-03 11:47:47 -05:00
Daniel Nephin
b462c93edb Generate ImageHistory from swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-01-03 11:47:44 -05:00
Daniel Nephin
b83d9bf6a9 Generate ContainerChanges from swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-01-03 09:35:40 -05:00
Daniel Zhang
c0cf14a73c API: Delete container can return 409, but that isn't documented. #29796
Signed-off-by: Daniel Zhang <jmzwcn@gmail.com>
2017-01-01 16:01:56 +08:00
Tobias Gesellchen
e6b2829a7f fix swagger description for DELETE /plugin/{name}
Signed-off-by: Tobias Gesellchen <tobias@gesellix.de>
2016-12-26 15:27:59 +01:00
Tonis Tiigi
3d86b0c79b Implement content addressability for plugins
Move plugins to shared distribution stack with images.

Create immutable plugin config that matches schema2 requirements.

Ensure data being pushed is same as pulled/created.

Store distribution artifacts in a blobstore.

Run init layer setup for every plugin start.

Fix breakouts from unsafe file accesses.

Add support for `docker plugin install --alias`

Uses normalized references for default names to avoid collisions when using default hosts/tags.

Some refactoring of the plugin manager to support the change, like removing the singleton manager and adding manager config struct.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2016-12-23 13:29:58 -08:00
Brian Goff
b2e348f2a6 Merge pull request #29527 from allencloud/change-minor-mistake
change minor mistake of spelling
2016-12-21 13:15:00 -05:00
Jie Luo
ea2dd4b5d0 duplicated the
Signed-off-by: Jie Luo <luo612@zju.edu.cn>

typo

Signed-off-by: Jie Luo <luo612@zju.edu.cn>

fix some typos

Signed-off-by: Jie Luo <luo612@zju.edu.cn>
2016-12-21 20:16:19 +08:00
allencloud
7c3657065c change minor mistake of spelling
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-12-20 21:05:19 +08:00
allencloud
29d4a7f512 update response status code for cluster request
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-12-19 10:21:10 +08:00
Ben Firshman
0caa6c218c
Add display name for tags in swagger.yaml
In #29071, we made the tags the correct name for generating types,
at the expense of the menu in the documentation looking good.

ReDoc now has support for tag display names
( https://github.com/Rebilly/ReDoc/pull/152 ), so we can assign
a more human-friendly name to the menu items.

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-12-14 12:00:04 +00:00
Vincent Demeester
1bc942597d Merge pull request #29216 from allencloud/add-status-code-403-for-services-create
add missing status code 403 for services/create in docs
2016-12-13 12:27:56 +01:00
Tibor Vass
c54b717caf plugins: container-rootfs-relative paths
Legacy plugins expect host-relative paths (such as for Volume.Mount).
However, a containerized plugin cannot respond with a host-relative
path. Therefore, this commit modifies new volume plugins' paths in Mount
and List to prepend the container's rootfs path.

This introduces a new PropagatedMount field in the Plugin Config.
When it is set for volume plugins, RootfsPropagation is set to rshared
and the path specified by PropagatedMount is bind-mounted with rshared
prior to launching the container. This is so that the daemon code can
access the paths returned by the plugin from the host mount namespace.

Signed-off-by: Tibor Vass <tibor@docker.com>
2016-12-09 10:16:24 -08:00
allencloud
19654fd71e add missing status code 403 for services/create in docs
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-12-10 01:54:51 +08:00
Tõnis Tiigi
51b422ce6a Merge pull request #29213 from yongtang/12072016-typo-swagger-yaml
Fix a couple of incorrect version strings in swagger.yaml
2016-12-07 16:47:49 -08:00
Vincent Demeester
9468d687ac Merge pull request #29062 from erxian/refine-api-swagger.yaml-towards-image-create-status-code
refine api swagger.yaml towards image create status code
2016-12-07 22:03:54 +01:00
Yong Tang
887c4188f4 Fix a couple of incorrect version string in swagger.yaml
This fix fixes a couple of incorrect version strings in swagger.yaml
`v1.25` should be `v1.26`. This applies to 1.14 version only.

Also checked 1.13rc and it is fine.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-12-07 08:11:12 -08:00
erxian
15be050fb3 refine api swagger.yaml towards image create status code
Signed-off-by: erxian <evelynhsu21@gmail.com>
2016-12-07 10:27:40 +08:00
Sebastiaan van Stijn
f687eb576f Merge pull request #29166 from allencloud/add-403-for-network-create-endpoint
add 403 for endpoint network create
2016-12-06 11:47:28 +01:00
Vincent Demeester
745795ef2e Merge pull request #28535 from yongtang/28497-prune-until
Convert DanglingOnly to Filters for `docker image prune`
2016-12-06 11:03:45 +01:00
allencloud
0d21e24b9f add 403 for endpoint network create
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-12-06 14:36:50 +08:00
Tibor Vass
1c96879f1e Merge pull request #28963 from vieux/refactor_plugin_install
refactor plugin install
2016-12-05 12:00:29 -08:00
Yong Tang
a6be56b54e Convert DanglingOnly to Filters for docker image prune
This fix convert DanglingOnly in ImagesPruneConfig to Filters,
so that it is possible to maintain API compatibility in the future.

Several integration tests have been added to cover changes.

This fix is related to 28497.

A follow up to this PR will be done once this PR is merged.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-12-02 20:08:49 -08:00
Sebastiaan van Stijn
535db46be5 Merge pull request #28349 from allencloud/add-missing-code-in-api-docs
add missing status code of swarm cluster in api 1.24
2016-12-03 02:04:05 +01:00
Victor Vieux
30db51c169 update docs
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-12-02 15:24:11 -08:00
Ben Firshman
30a9249e15
Use singular tag names in swagger.yaml
This is required to make the type generation put things in the
correct directory, but unfortunately makes the names in the
documentation menu look a bit crap.

I think the best solution would be to add a `x-display-name`
extension to tags to determine how the tags show up in the menu,
rather than it depend on the name of the tag. I shall do this in
a follow-up PR - for now, let's fix the breakage.

Fixes #29045

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-12-02 14:14:36 +00:00
allencloud
9a1f7b6b0b add missing status code in api docs
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-12-02 11:24:45 +08:00
Ben Firshman
bf6a790f00
Make swagger.yaml operationIds consistent
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-28 11:24:26 +00:00
Ben Firshman
54051b18a1
Make docs URLs in swagger.yaml absolute
This makes the swagger.yaml useful outside of the documentation.
For background:
https://github.com/docker/docker.github.io/pull/606#issuecomment-261389645

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-28 11:24:26 +00:00
Ben Firshman
2aea9ad56b
Improve tags in swagger.yaml
- Consistent naming (plural, etc)
- Add section descriptions
- Add docs in swagger.yaml about how to maintain them

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-28 11:24:25 +00:00
Ben Firshman
be52738a2c
Add intro to swagger.yaml to explain what it's for
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-28 11:24:25 +00:00
Victor Vieux
22ba220e86 Merge pull request #28727 from cyli/do-not-display-secret-digest
Do not display the digest or size of swarm secrets [1.13]
2016-11-22 16:44:06 -08:00
Anusha Ragunathan
23ea9e45fd Merge pull request #28601 from tiborvass/plugin-misc-fixes
Plugin miscellaneous fixes
2016-11-22 16:12:37 -08:00
cyli
fe127b7eae Update docs to reflect no longer displaying secret digest or size.
Signed-off-by: cyli <cyli@twistedmatrix.com>
2016-11-22 18:18:56 -05:00
Sebastiaan van Stijn
313502488e Merge pull request #28506 from bfirsh/prepare-api-docs-for-swagger-docs
Prepare docs and Swagger definition for automatically generated API docs
2016-11-22 22:47:38 +01:00
Tibor Vass
53b9b99e5c plugins: support for devices
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-11-22 09:54:45 -08:00
Ben Firshman
44c50807c6
Update swagger.yaml with changes to API
Up to and including 673c5ee559

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-22 12:49:38 +00:00
Ben Firshman
c97f67dbab
Add version information to swagger.yaml
- Tidied up copy
- API version is now mandatory
- Links to previous API versions

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-22 12:49:38 +00:00
Ben Firshman
f0d55cd081
Rename Remote API to Engine API
Implementation of https://github.com/docker/docker/issues/28319

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-22 12:49:38 +00:00
Tibor Vass
9f239281b1 plugins: linux capabilities and device creation
In the plugin manifest, Capabilities has been moved to
Linux.Capabilities to avoid confusion with Interface.Types[i].Capability

A DeviceCreation boolean has also been added to the manifest. This could
be changed in the future to be specific to a major number.

Signed-off-by: Tibor Vass <tibor@docker.com>
2016-11-21 14:52:14 -08:00
Anusha Ragunathan
83ca993c15 Add HTTP client timeout.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-11-21 13:11:40 -08:00
Aaron Lehmann
948e60691e 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
Stephen J Day
1d90d76048
api/server/httputils: service unavailable for disable swarm
When swarm-mode is disabled, we need to return an error indicating this.
406 was chosen for the "Not Acceptable" verbiage, but this code has
specific semantics in relation to the `Accept` header, which aren't
applicable here.

We now use a 503 for this case. While it is not a perfect match, it does
make it clear that the particular "service" (read: API endpoint) is not
available. The body of the message provides the user with enough
information to take action on it by enabling swarm-mode and ensuring the
service is available.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2016-11-17 11:43:45 -08:00
John Howard
9182cf1a8d Bump API to v1.26
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-11-14 14:24:02 -08:00
Victor Vieux
aef1dec9a6 update swagger and docs
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-11-10 11:58:15 -08:00
Ben Firshman
48af987afe
Update misc things in swagger.yaml
Changes to docs/reference/api/docker_remote_api_v1.25.md up to
and including 2d42032225

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-10 10:10:12 -08:00
Ben Firshman
54c37ecc23
Add /plugins/{name}/set endpoint to swagger.yaml
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-10 10:10:12 -08:00
Ben Firshman
50a5f3afaf
Add prune endpoints to swagger.yaml
Introduced in #26108

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-10 10:07:25 -08:00
Victor Vieux
49ca91fbeb rename plugin manifest
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-11-10 00:09:23 -08:00
Anusha Ragunathan
5b6e1bc9e5 Add plugin create functionality.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-11-09 15:23:03 -08:00
Ben Firshman
e5e1c7feef
Fix validation errors in swagger.yaml
- Some objects were missing `type: "object"`
- Some examples had invalid null values (go-swagger validation
  doesn't support x-nullable, so they have just been removed)
- ImageSummary example was out of date
- Removed timeNano because YAML interprets it as a float, not
  a long (sigh)
- Tidy up archive errors

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-07 11:03:10 -08:00
Ben Firshman
cd0c0d0666
Add logo to swagger.yaml
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-07 11:03:09 -08:00
allencloud
002262d6f5 node rm can be applied on not only active node
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-11-02 17:22:04 +08:00
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