David Calavera
1f5674363e
Print the raw inspected elements when there is no template for `docker inspect`.
...
Otherwise we're ignoring the fields that Swarm adds to the output.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-17 23:17:52 -05:00
Anusha Ragunathan
f8dc044aec
Create build router separate from image router.
...
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2015-12-17 16:56:11 -08:00
David Calavera
defd1519f7
Remove api client lib dependency on tlsconfig and sockets packages.
...
- Let consumers to configure the http transport initially and apply or
defaults on top.
- Add function to initialize a new client based on environment
variables, useful for integrators.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-17 19:04:49 -05:00
Tibor Vass
03a170c48d
builder: remove daemon dependency in ContainerCreate()
...
Signed-off-by: Tibor Vass <tibor@docker.com>
2015-12-17 16:57:08 +01:00
Vincent Demeester
0f749ad55a
Merge pull request #18559 from ahmetalpbalkan/return-container-networks
...
Proposal: Add container networks list to /containers/json
2015-12-17 10:11:18 +01:00
Zhang Wei
aaf65a47a7
Better debug message for post form data
...
Print json format instead of default `%q`
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2015-12-17 15:55:39 +08:00
David Calavera
905f3336b2
Merge pull request #15964 from duglin/APIVersion
...
Add a DOCKER_API_VERSION env var
2015-12-16 14:23:47 -08:00
Tonis Tiigi
eeb2d4c1ad
Clean up reference type switches
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2015-12-16 11:58:53 -08:00
Tonis Tiigi
c1040b222c
Remove unused repoinfo
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2015-12-16 11:58:52 -08:00
Tonis Tiigi
ffded61dad
Update Named reference with validation of conversions
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2015-12-16 11:58:52 -08:00
Tonis Tiigi
2655954c2d
Add own reference package wrapper
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2015-12-16 11:58:52 -08:00
David Calavera
b44b5bbc8b
Merge pull request #18682 from calavera/replace_units_package
...
Replace pkg/units with docker/go-units.
2015-12-16 10:48:59 -08:00
David Calavera
4fef42ba20
Replace pkg/units with docker/go-units.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-16 12:26:49 -05:00
Antonio Murdaca
38f409d283
api: client: lib: fix go vet
...
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2015-12-16 12:00:48 +01:00
David Calavera
e98cae4919
Move filters package to the API.
...
These filters are only use to interchange data between clients and daemons.
They don't belong to the parsers package.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-15 18:13:26 -05:00
David Calavera
52fd30079a
Merge pull request #18685 from calavera/remove_timeutils
...
Move timeutils functions to the only places where they are used.
2015-12-15 15:11:18 -08:00
David Calavera
7bb30e0aeb
Merge pull request #18676 from dnephin/more_registry_types_to_api
...
Move registry.SearchResult types to api/types/registry
2015-12-15 12:00:24 -08:00
David Calavera
27220ecc6b
Move timeutils functions to the only places where they are used.
...
- Move time json marshaling to the jsonlog package: this is a docker
internal hack that we should not promote as a library.
- Move Timestamp encoding/decoding functions to the API types: This is
only used there. It could be a standalone library but I don't this
it's worth having a separated repo for this. It could introduce more
complexity than it solves.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-15 14:56:14 -05:00
Jess Frazelle
2180dd6cf0
Merge pull request #18617 from tiborvass/cleanup-builder
...
Cleanup builder: remove container package dependency
2015-12-15 09:59:29 -08:00
Brian Goff
ce0b1841c8
Merge pull request #17034 from rhvgoyal/volume-propagation
...
Capability to specify per volume mount propagation mode
2015-12-15 12:14:41 -05:00
Jess Frazelle
adf1ffd53b
Merge pull request #18416 from toli/disable-official-repo-check-in-push
...
Removing the restriction to push to an 'official' repo
2015-12-15 08:52:36 -08:00
Daniel Nephin
c4472b389d
Move registry.SearchResult types to api/types/registry.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-12-15 11:44:20 -05:00
Tibor Vass
2a2d1f57b5
dockerfile: get rid of Commit and CommitConfig
...
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 400e4922cbd004b93774fc55005f74bd8a995242)
2015-12-15 17:23:40 +01:00
Sebastiaan van Stijn
98d97743d2
Merge pull request #18536 from WeiZhang555/daemon-err
...
Better error message for invalid unix socket format
2015-12-15 11:51:47 +01:00
Arnaud Porterie
2ec34dca05
Merge pull request #18650 from calavera/remove_httputils_dep_from_api
...
Remove httputils dependency from API client lib.
2015-12-14 20:51:53 -08:00
Ahmet Alp Balkan
755f8609f6
Add containers’ networks to /containers/json
...
After addition of multi-host networking in Docker 1.9, Docker Remote
API is still returning only the network specified during creation
of the container in the “List Containers” (`/containers/json`) endpoint:
...
"HostConfig": {
"NetworkMode": "default"
},
The list of networks containers are attached to is only available at
Get Container (`/containers/<id>/json`) endpoint.
This does not allow applications utilizing multi-host networking to
be built on top of Docker Remote API.
Therefore I added a simple `"NetworkSettings"` section to the
`/containers/json` endpoint. This is not identical to the NetworkSettings
returned in Get Container (`/containers/<id>/json`) endpoint. It only
contains a single field `"Networks"`, which is essentially the same
value shown in inspect output of a container.
This change adds the following section to the `/containers/json`:
"NetworkSettings": {
"Networks": {
"bridge": {
"EndpointID": "2cdc4edb1ded3631c81f57966563e...",
"Gateway": "172.17.0.1",
"IPAddress": "172.17.0.2",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": "02:42:ac:11:00:02"
}
}
}
This is of type `SummaryNetworkSettings` type, a minimal version of
`api/types#NetworkSettings`.
Actually all I need is the network name and the IPAddress fields. If folks
find this addition too big, I can create a `SummaryEndpointSettings` field
as well, containing just the IPAddress field.
Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-12-14 19:03:23 -08:00
Zhang Wei
20012e423c
Better error message for invalid unix socket format
...
Give more meaningful error prompts when user try to bind a directory as
unix socket.
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2015-12-15 10:05:58 +08:00
Vincent Demeester
87740d001c
Merge pull request #18644 from calavera/remove_timeout_func_dependency_from_api_lib
...
Remove timeout shared function.
2015-12-14 23:05:29 +01:00
David Calavera
83b5729f64
Remove httputils dependency from API client lib.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-14 16:48:59 -05:00
Doug Davis
6287ec9095
Add a DOCKER_API_VERSION env var
...
Closes : #11486
Just for @ahmetalpbalkan :-)
Fixed some comment formatting too while in there.
Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-12-14 12:45:34 -08:00
David Calavera
75d69ce0da
Merge pull request #18637 from dnephin/move_auth_config
...
Move more api types to api/types package
2015-12-14 11:53:30 -08:00
David Calavera
9dc7d07fc1
Remove timeout shared function.
...
Handle timeouts when it's necessary based on a Timeout interface.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-14 14:24:21 -05:00
David Calavera
b679eb9a82
Force API versioning in the client library.
...
Remove dependencies on docker's version packages.
Allow empty version as a fallback to latest version.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-14 12:06:42 -05:00
Daniel Nephin
96c10098ac
Move IndexInfo and ServiceConfig types to api/types/registry/registry.go
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-12-14 11:28:02 -05:00
Tibor Vass
44299989b2
Merge pull request #18631 from tiborvass/cleanup-utils
...
Create `builder/dockerignore` and `pkg/gitutils` to clean up `utils`
2015-12-14 17:22:01 +01:00
Daniel Nephin
5b321e3287
Move AuthConfig to api/types
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-12-14 11:22:01 -05:00
toli
0d824c760e
Removing the restriction to push to a 'official' repo
...
Signed-off-by: toli <toli@docker.com>
2015-12-14 07:45:00 -08:00
Vivek Goyal
a2dc4f79f2
Add capability to specify mount propagation per volume
...
Allow passing mount propagation option shared, slave, or private as volume
property.
For example.
docker run -ti -v /root/mnt-source:/root/mnt-dest:slave fedora bash
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
2015-12-14 10:39:53 -05:00
Vincent Demeester
5e0283effa
Merge pull request #18618 from dnephin/refactor_resolve_auth_config
...
Refactor ResolveAuthConfig to remove the builder dependency on cli code
2015-12-14 15:23:36 +01:00
Tibor Vass
63e3816c1d
utils: move dockerignore function to builder/dockerignore
...
Signed-off-by: Tibor Vass <tibor@docker.com>
2015-12-14 14:59:52 +01:00
Tibor Vass
135cca6f52
utils: move git functions to pkg/gitutils
...
Signed-off-by: Tibor Vass <tibor@docker.com>
2015-12-14 14:59:52 +01:00
Antonio Murdaca
5fd9a8f603
Merge pull request #18616 from calavera/move_client_version_to_docker_cli
...
Move client version to the docker cli.
2015-12-14 11:43:01 +01:00
Justas Brazauskas
927b334ebf
Fix typos found across repository
...
Signed-off-by: Justas Brazauskas <brazauskasjustas@gmail.com>
2015-12-13 18:04:12 +02:00
Antonio Murdaca
1fffc0270f
Merge pull request #15365 from twistlock/14674-docker-authz
...
Docker authorization plug-in infrastructure
2015-12-12 12:30:33 +01:00
Daniel Nephin
920ea13516
Refactor ResolveAuthConfig to remove the builder dependency on cli code.
...
registry.ResolveAuthConfig() only needs the AuthConfigs from the ConfigFile, so
this change passed just the AuthConfigs.
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-12-11 19:31:24 -08:00
David Calavera
229d3bace8
Move client version to the docker cli.
...
This removes the dockerversion dependency from the client library.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-11 19:03:33 -05:00
David Calavera
91799c232e
Merge pull request #18610 from runcom/fix-warn
...
api: client: info: add newline after warning
2015-12-11 13:41:14 -08:00
Antonio Murdaca
bb3d7e1e65
api: client: info: add newline after warning
...
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2015-12-11 20:54:51 +01:00
David Calavera
bc02d42d9e
Make sure template inspector always prints a carriage return.
...
To match with the raw inspector.
Adds tests to verify its functionality.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-10 21:13:13 -05:00
Jess Frazelle
a16a1d75d9
Merge pull request #18564 from runcom/warn-on-loopback
...
api: client: info: print a warning if dm is using a loopback file
2015-12-11 10:11:03 +10:00
Alexander Morozov
ac453a310b
Merge pull request #18353 from aaronlehmann/transfer-manager
...
Improved push and pull with upload manager and download manager
2015-12-10 14:52:48 -08:00
David Calavera
a0f80079b8
Merge pull request #18557 from cpuguy83/use_correct_resize_fn
...
Use correct fn for resizing TTY
2015-12-10 12:37:13 -08:00
Antonio Murdaca
a2c4c0cd3a
api: client: info: print a warning if dm is using a loopback file
...
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2015-12-10 14:05:28 +01:00
Sebastiaan van Stijn
3d82564c7a
Merge pull request #18562 from haoshuwei/modify-wordspelling-in-docker-stats
...
Modify word spelling in stats.go's comments
2015-12-10 13:32:10 +01:00
Sebastiaan van Stijn
d46650b3c7
Merge pull request #18553 from calavera/remove_specific_go_1_5_calls
...
Remove call to template.Option when building with 1.4.
2015-12-10 09:28:00 +01:00
Shuwei Hao
413e058b72
Modify word spelling errors in stats.go
...
Signed-off-by: Shuwei Hao <haosw@cn.ibm.com>
2015-12-10 06:57:25 +00:00
Brian Goff
3260ddb10b
Use correct fn for resizing TTY
...
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-12-09 22:55:01 -05:00
Aaron Lehmann
572ce80230
Improved push and pull with upload manager and download manager
...
This commit adds a transfer manager which deduplicates and schedules
transfers, and also an upload manager and download manager that build on
top of the transfer manager to provide high-level interfaces for uploads
and downloads. The push and pull code is modified to use these building
blocks.
Some benefits of the changes:
- Simplification of push/pull code
- Pushes can upload layers concurrently
- Failed downloads and uploads are retried after backoff delays
- Cancellation is supported, but individual transfers will only be
cancelled if all pushes or pulls using them are cancelled.
- The distribution code is decoupled from Docker Engine packages and API
conventions (i.e. streamformatter), which will make it easier to split
out.
This commit also includes unit tests for the new distribution/xfer
package. The tests cover 87.8% of the statements in the package.
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-12-09 19:13:35 -08:00
David Calavera
6df3fc5175
Remove call to template.Option when building with 1.4.
...
Windows still relies on 1.4.2 to build Docker.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 17:30:16 -05:00
Daniel Nephin
efda9618db
Move networking api types to the api/types/networking package.
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-12-09 13:55:59 -08:00
David Calavera
2ec468e284
Make the commit configuration to be a typed struct rather than accepting a string.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:06:58 -05:00
David Calavera
57b6796304
Implement all inspect commands with the new inspector interface.
...
It makes the behavior completely consistent across commands.
It adds tests to check that execution stops when an element is not
found.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:05:01 -05:00
David Calavera
5a0a6ee9cd
Remove old http from the docker cli.
...
Everything has been ported to the client library 🎉
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:05:00 -05:00
David Calavera
e4abf48567
Implement docker search with standalone client lib.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:05:00 -05:00
David Calavera
d1057e4c46
Implement docker resize with standalone client lib.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:05:00 -05:00
David Calavera
cf3efd05d4
Implement docker inspect with standalone client lib.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:05:00 -05:00
David Calavera
42670e30ee
Implement docker push with standalone client lib.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:05:00 -05:00
David Calavera
e78f02c4db
Implement docker pull with standalone client lib.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:05:00 -05:00
David Calavera
e59d54bd99
Implement docker stats with standalone client lib.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:05:00 -05:00
David Calavera
3f9f23114f
Implement docker exec with standalone client lib.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:59 -05:00
David Calavera
bcb848c87f
Implement docker run with standalone client lib.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:59 -05:00
David Calavera
962b2d8b9b
Implement docker start with standalone client lib.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:59 -05:00
David Calavera
5e80ac9c84
Implement docker attach with standalone client lib.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:59 -05:00
David Calavera
d9a62c5f2b
Lowercase http method functions.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:59 -05:00
David Calavera
0b0431a856
Change references to query values.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:59 -05:00
David Calavera
8b15839ee8
Create interface that clients that talk to the api must fulfill.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:58 -05:00
David Calavera
a413be3392
Fix client lib errors documentation.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:58 -05:00
David Calavera
73bca058ae
Implement docker volume with standalone client lib.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:58 -05:00
David Calavera
8c9c9e137c
Use ensureReaderClosed consistently to close a response body reader.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:58 -05:00
David Calavera
7df71ca31d
Implement getExitCode with standalone client lib.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:58 -05:00
David Calavera
51efb1480a
Implement docker wait with standalone client lib.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:58 -05:00
David Calavera
1fe912151b
Implement docker version with standalone client lib.
...
Use Go template definitions for default format.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:58 -05:00
David Calavera
b8be62e28e
Implement docker unpause with standalone client lib.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:57 -05:00
David Calavera
d78ce02f88
Implement trusted tagging with standalone client lib.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:57 -05:00
David Calavera
7573c153c5
Implement docker top with standalone client lib.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:57 -05:00
David Calavera
21ffdf0e0e
Implement docker tag with standalone client lib.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:57 -05:00
David Calavera
9ec1cf92f5
Implement docker stop with standalone client lib.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:57 -05:00
David Calavera
373f55eecd
Implement docker save with standalone client lib.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:56 -05:00
David Calavera
37d6fee8cf
Implement docker rmi with standalone client lib.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:56 -05:00
David Calavera
fb6533e6cf
Implement docker remove with standalone client lib.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:56 -05:00
David Calavera
b7de53634c
Implement docker restart with standalone client lib.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:56 -05:00
David Calavera
ac8fb77c74
Implement container rename with standalone client lib.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:56 -05:00
David Calavera
d05aa418b0
Implement docker ps with standanlone client lib.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:56 -05:00
David Calavera
eeee2eae86
Implement docker port with standalone client lib.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:56 -05:00
David Calavera
55333e8f90
Implement docker pause with standalone client lib.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:56 -05:00
David Calavera
356768bc01
Implement docker network with standalone client lib.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:55 -05:00
David Calavera
0876742646
Implement docker logs with standalone client lib.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:55 -05:00
David Calavera
b36531db60
Implement docker login with standalone client lib.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:55 -05:00
David Calavera
9073a52ea8
Implement docker load with standalone client lib.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:55 -05:00
David Calavera
c57e62d00e
Implement docker kill with standalone client lib.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:55 -05:00
David Calavera
535c4c9a59
Implement docker build with standalone client lib.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:55 -05:00
David Calavera
900ad2897f
Implement docker info with standalone client lib.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:54 -05:00
David Calavera
6bf757500b
Implement docker import with the standalone client lib.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:54 -05:00
David Calavera
381262fbea
Implement docker images with the standalone client lib.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:54 -05:00
David Calavera
45eca43f5b
Implement docker history with the standalone client lib.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:54 -05:00
David Calavera
e0549b8ceb
Implement docker export with standalone client lib.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:54 -05:00
David Calavera
11c4cc9dde
Implement docker events with standalone client lib.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:54 -05:00
David Calavera
e562ac42f4
Implement docker diff with standalone client lib.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:53 -05:00
David Calavera
136e8fef64
Implement docker container create with standalone client lib.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:53 -05:00
David Calavera
1698fe01f5
Implement docker image create with standalone client lib.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:53 -05:00
David Calavera
1b2b91ba43
Implement docker cp with standalone client lib.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:53 -05:00
David Calavera
8c9ad7b818
Implement docker commit with standalone client lib.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:53 -05:00
David Calavera
589df17a1a
Extract API client struct as standalone client.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:53 -05:00
Liron Levin
f28230d35c
Rebase from master
...
Signed-off-by: Liron Levin <liron@twistlock.com>
2015-12-08 19:45:22 +02:00
Liron Levin
75c353f0ad
Docker authorization plug-in infrastructure enables extending the functionality of the Docker daemon with respect to user authorization. The infrastructure enables registering a set of external authorization plug-in. Each plug-in receives information about the user and the request and decides whether to allow or deny the request. Only in case all plug-ins allow accessing the resource the access is granted.
...
Each plug-in operates as a separate service, and registers with Docker
through general (plug-ins API)
[https://blog.docker.com/2015/06/extending-docker-with-plugins/ ]. No
Docker daemon recompilation is required in order to add / remove an
authentication plug-in. Each plug-in is notified twice for each
operation: 1) before the operation is performed and, 2) before the
response is returned to the client. The plug-ins can modify the response
that is returned to the client.
The authorization depends on the authorization effort that takes place
in parallel [https://github.com/docker/docker/issues/13697 ].
This is the official issue of the authorization effort:
https://github.com/docker/docker/issues/14674
(Here)[https://github.com/rhatdan/docker-rbac ] you can find an open
document that discusses a default RBAC plug-in for Docker.
Signed-off-by: Liron Levin <liron@twistlock.com>
Added container create flow test and extended the verification for ps
2015-12-08 17:34:15 +02:00
Brian Goff
41ae615aa1
Merge pull request #18442 from MHBauer/move-configs
...
move configs structs to remove dependency on deamon
2015-12-07 13:38:43 -05:00
Morgan Bauer
63fb931a0b
move configs structs to remove dependency on daemon
...
- Moved the following config structs to api/types
- ContainerRmConfig
- ContainerCommitConfig
Signed-off-by: Morgan Bauer <mbauer@us.ibm.com>
2015-12-07 09:03:25 -08:00
Tibor Vass
1f8efc687c
Merge pull request #18123 from aidanhs/aphs-fail-on-broken-tar
...
Ensure adding a broken tar doesn't silently fail
2015-12-07 14:38:21 +01:00
Doug Davis
2ecbc9774b
Merge pull request #18463 from haoshuwei/modify-containerinspect-tocheckstatuscode
...
Modify docker inspect client to check statusCode instead of strings c…
2015-12-07 07:55:26 -05:00
Doug Davis
0bb4f82d2d
Merge pull request #18425 from wenchma/18424-ErrorCodeNoSuchContainer
...
Correct the message of ErrorCodeNoSuchContainer to "No such container"
2015-12-07 07:48:04 -05:00
Shuwei Hao
6306eb3cd3
Modify docker network inspect client to check statusCode instead of string contain
...
Signed-off-by: Shuwei Hao <haoshuwei24@gmail.com>
2015-12-07 10:11:46 +00:00
Shuwei Hao
e719c9225c
Modufy docker inspect client to check statusCode instead of strings contains
...
Signed-off-by: Shuwei Hao <haosw@cn.ibm.com>
2015-12-07 10:03:46 +00:00
Sebastiaan van Stijn
5b4734aaa5
Merge pull request #17788 from haoshuwei/modify-volume-inspect-multi
...
Modify docker volume inspect to return existed volumes and the names of the unexsited volumes
2015-12-06 14:03:46 +01:00
Phil Estes
51b0f23127
Merge pull request #18398 from calavera/system_backend
...
Move docker system information to a dedicated router and backend.
2015-12-04 12:56:57 -05:00
Wen Cheng Ma
c424c8c32c
Correct the message of ErrorCodeNoSuchContainer to "No such container"
...
Fixes issue #18424
Signed-off-by: Wen Cheng Ma <wenchma@cn.ibm.com>
2015-12-04 15:00:08 +08:00
David Calavera
29c69ce2a9
Merge pull request #18374 from calavera/volume_inspect_exit
...
Return error code when `volume inspect` fails with a template.
2015-12-03 13:31:47 -08:00
Phil Estes
4d849619d4
Merge pull request #17481 from vdemeester/17446-network-inspect-format
...
Add format flag to network inspect
2015-12-03 16:16:04 -05:00
David Calavera
867f432985
Move docker system information to a dedicated router and backend.
...
Because I like the name `system` better than `local` :)
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-03 13:38:56 -05:00
David Calavera
b9d30280f6
Return error code when `volume inspect` fails with a template.
...
Following `docker inspect` conventions:
- Keep partial info in a buffer to not print incomplete template outputs.
- Break execution when template parsing or decoding fail.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-03 13:22:55 -05:00
Tibor Vass
33ab2bb52c
Merge pull request #18266 from calavera/events_pub_sub
...
Event PubSub topics + linear filtering.
2015-12-03 17:11:40 +01:00
David Calavera
434d2e8745
Add PubSub topics.
...
A TopicFunc is an interface to let the pubisher decide whether it needs
to send a message to a subscriber or not. It returns true if the
publisher must send the message and false otherwise.
Users of the pubsub package can create a subscriber with a topic
function by calling `pubsub.SubscribeTopic`.
Message delivery has also been modified to use concurrent channels per
subscriber. That way, topic verification and message delivery is not
o(N+M) anymore, based on the number of subscribers and topic verification
complexity.
Using pubsub topics, the API stops controlling the message delivery,
delegating that function to a topic generated with the filtering
provided by the user. The publisher sends every message to the
subscriber if there is no filter, but the api doesn't have to select
messages to return anymore.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-02 16:43:49 -05:00
Vincent Demeester
295c27388d
Add format flag to network inspect
...
…for consistency as docker inspect and docker volume inspect supports it too
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-12-02 22:32:10 +01:00
Sebastiaan van Stijn
6deec021e5
Merge pull request #18309 from WeiZhang555/time
...
Consolidate time format for API
2015-12-02 22:28:28 +01:00
Jess Frazelle
fcccf2dae4
Merge pull request #18350 from duglin/Issue9798a
...
Deprecate -f flag from docker tag
2015-12-02 08:16:09 -08:00
David Calavera
93d1dd8036
Make filtering a linear operation.
...
Improves the current filtering implementation complixity.
Currently, the best case is O(N) and worst case O(N^2) for key-value filtering.
In the new implementation, the best case is O(1) and worst case O(N), again for key-value filtering.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-02 11:12:42 -05:00
Zhang Wei
9daca1222a
Consolidate time format for API
...
Consolidate all the API to same time format: RFC3339, and it will be
client's responsibility to present it in more user friendly way.
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2015-12-02 22:40:18 +08:00
Antonio Murdaca
2969abc6c5
Move defaultSHMSize in daemon pkg
...
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2015-12-02 10:28:10 +01:00
Doug Davis
8d4fe141c4
Deprecate -f flag from docker tag
...
Closes #9798
@maintainers please note that this is a change to the UX. We no longer
require the -f flag on `docker tag` to move a tag from an existing image.
However, this does make us more consistent across our commands,
see https://github.com/docker/docker/issues/9798 for the history.
Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-12-01 19:53:49 -08:00
Alexander Morozov
3962fe5d7b
Merge pull request #18343 from calavera/unify_debug_logging
...
[Carry 18260] Remove info logging from every api call.
2015-12-01 13:42:57 -08:00
David Calavera
82323294db
Unify both debug logging middlewares.
...
We can remove one function from the stack by injecting the middleware
only when logging in enabled and the level is debug.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-01 14:33:33 -05:00
Antonio Murdaca
ef1d410b02
fix shm size handling
...
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2015-12-01 16:29:40 +01:00
Shuwei Hao
6295345005
Modify docker volume inspect to return existed volumes
...
Signed-off-by: Shuwei Hao <haoshuwei24@gmail.com>
2015-12-01 01:43:02 +00:00
Alexander Morozov
ca5795cef8
Remove usage of listenbuffer package
...
It actually adds nothing to queuing requests.
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-11-30 09:04:55 -08:00
Dan Walsh
cf4fb15088
The loggingMiddleware function is adding lots of messages to the log
...
When tools like kubernetes and cockpit are talking to the docker daemon
actively, we are seeing large number of log messages that look like debug
information.
For example
docker info adds the following line to journald.
Nov 26 07:09:23 dhcp-10-19-62-196.boston.devel.redhat.com docker[32686]: time="2015-11-26T07:09:23.124503455-05:00" level=info msg="GET /v1.22/info"
We think this should be Debug level not Info level.
Signed-off-by: Dan Walsh <dwalsh@redhat.com>
2015-11-26 07:10:38 -05:00
Alex Crawford
a8b84cd8fb
Revert "Return listenbuffer behavior"
...
This reverts commit 281a48d092
.
Signed-off-by: Alex Crawford <alex.crawford@coreos.com>
2015-11-24 18:32:57 -08:00
David Calavera
85c3c6865e
Split container backend into several specialized interfaces.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-11-24 14:03:39 -05:00
David Calavera
38abba9e2c
Move versioned references of inspect functions to the daemon.
...
Leaving only one versioned main function that a backend must implement.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-11-24 14:03:39 -05:00
Dong Chen
fa8d96ebe2
Add container package for container APIs.
...
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
2015-11-24 14:03:07 -05:00
Dong Chen
a5bf10f37e
move container files to a separate folder. Following changes will update them.
...
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
2015-11-24 14:03:07 -05:00
Tonis Tiigi
4352da7803
Update daemon and docker core to use new content addressable storage
...
Add distribution package for managing pulls and pushes. This is based on
the old code in the graph package, with major changes to work with the
new image/layer model.
Add v1 migration code.
Update registry, api/*, and daemon packages to use the reference
package's types where applicable.
Update daemon package to use image/layer/tag stores instead of the graph
package
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2015-11-24 09:40:25 -08:00