Commit Graph

1830 Commits

Author SHA1 Message Date
c8d36013e6 Rework usage of context.Context in api/client
Make better default usage on context.Context on the `api/client` package
to share the context (it is useless if not shared, which was the case
for a lot of commands).

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 4c7f0d268f413b4a55ea638a97382d9316d082af
Component: engine
2016-05-21 15:57:57 +02:00
214a2bf487 Add a --filter option to docker search
The filtering is made server-side, and the following filters are
supported:

* is-official (boolean)
* is-automated (boolean)
* has-stars (integer)

Signed-off-by: Fabrizio Soppelsa <fsoppelsa@mirantis.com>
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: e009ebdf4c0bf0ff64da8d48eefad63d0644de3e
Component: engine
2016-05-20 13:41:28 +02:00
b96d544c7a Fix bug which mistakes 400 error for 500
Signed-off-by: Wang Xing <hzwangxing@corp.netease.com>
Upstream-commit: beca2615782e24fa28803ada067129fdfa88c77d
Component: engine
2016-05-19 20:01:55 +08:00
e4da61ff20 Merge pull request #22356 from allencloud/close-http-response-body-when-attaching
close http response body when attaching
Upstream-commit: 28452ca78346cf8824ea71be35b4773f96405b1a
Component: engine
2016-05-11 12:44:35 -10:00
86911550d2 Remove deprecated Docker Content Trust ENV passphrase variables
Since 1.9, Docker Content Trust Offline key has been renamed to
Root key and the Tagging key has been renamed to Repository key.
The corresponding environment variables
`DOCKER_CONTENT_TRUST_OFFLINE_PASSPHRASE`
`DOCKER_CONTENT_TRUST_TAGGING_PASSPHRASE`
have also been deprecated and renamed to
`DOCKER_CONTENT_TRUST_ROOT_PASSPHRASE`
`DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE`

This fix removed the deprecated ENV passphrase variables for
1.12 and updated the docs.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 1f0d5aba50803ff401197f96f6a830384d0c04c5
Component: engine
2016-05-07 14:25:28 -07:00
003c321b57 Merge pull request #21889 from cpuguy83/logscmd_add_attrs
Add support for reading logs extra attrs
Upstream-commit: 08ec3606f1656962084222412debf2888f15f553
Component: engine
2016-05-07 20:26:33 +02:00
697f71e4f2 Add support for reading logs extra attrs
The jsonlog logger currently allows specifying envs and labels that
should be propagated to the log message, however there has been no way
to read that back.

This adds a new API option to enable inserting these attrs back to the
log reader.

With timestamps, this looks like so:
```
92016-04-08T15:28:09.835913720Z foo=bar,hello=world hello
```

The extra attrs are comma separated before the log message but after
timestamps.

Without timestaps it looks like so:
```
foo=bar,hello=world hello
```

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: bd9d14a07b9f1c82625dc8483245caf3fa7fe9e6
Component: engine
2016-05-06 20:42:20 -04:00
8d7aa0501d Update trust.go to reflect NotaryRepository API changes:
- Update now returns only an error
 - NewNotaryRepository now takes a trustpinning configuration - we will provide an empty one for now.

Signed-off-by: cyli <cyli@twistedmatrix.com>
Upstream-commit: d869d2b0a07105c80a24755ac6dd12476a085453
Component: engine
2016-05-06 10:59:28 -07:00
10461278b6 close http response body when attaching
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 54d09c6c2d5413f7a05c8a1bc4011298d93979e3
Component: engine
2016-05-06 16:58:22 +08:00
b07f1e75d0 Update engine-api to 1fb8f09960cc32b9648495a422c960fb2a4f8a09
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
Upstream-commit: 97d95604e0f2ac259d60257db0282561e5f52d03
Component: engine
2016-05-05 18:36:09 -04:00
9fb835ad73 Fix #22240 do not pull all the tags implicitely
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 54ebe42de9c359e0c9f171953bd787bb997d719e
Component: engine
2016-05-01 14:46:04 +02:00
9d2d2e1d41 Merge pull request #22372 from dnephin/cli_cleanup
Reorganize client and cli packages
Upstream-commit: 90dfb3dacc56d789b70f5b5f3da6791465706c6c
Component: engine
2016-04-29 17:31:39 -07:00
b5a44200d5 Remove reflection on CLI init
before:
```
$ time docker --help
real  0m0.177s
user  0m0.000s
sys 0m0.040s
```

after:
```
$ time docker --help
real  0m0.010s
user  0m0.000s
sys 0m0.000s
```

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 5c8950e84d2384919f45209f8cc4cbf00ff29015
Component: engine
2016-04-29 11:57:46 -04:00
1f29278b9e Fix bug: exec non-exist command miss a "\n"
When exec a non-exist command, it should print a newline at last.

Currently:
```
$ docker exec -ti f5f703ea2c0a144 bash
rpc error: code = 2 desc = "oci runtime error: exec failed: exec:
\"bash\": executable file not found in $PATH"$
```

Signed-off-by: Feng Yan <fy2462@gmail.com>
Upstream-commit: 8bf5613c1aca634e517e895e90e74f4263cf030f
Component: engine
2016-04-28 16:39:00 +08:00
6f2f3ad4cc Refactor cliconfig so that the default constructor can exist in the package.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 30e3620eaea88cf33fd7deb8c88359469c27b3f7
Component: engine
2016-04-27 14:25:47 -04:00
63df8770d3 Cleanup the structure of the cli package.
Move all flags into cli/flags
Move usage help into cli/usage.go

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 33c9edaf6c5401fc1891713d1ad8d861e6cea51f
Component: engine
2016-04-27 14:25:47 -04:00
860fb4199d make Insecure registries uppercase like other keys in docker info
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: e78884dafd2e9f5378626c4699c6b3b713eecf03
Component: engine
2016-04-25 18:44:34 +08:00
76284509d6 Merge pull request #22138 from wenchma/deprecated_since_before
Deprecated of docker ps since and before options for v1.12
Upstream-commit: 4e5ad97f5b2d9db237546e67de3049649c5ff5e8
Component: engine
2016-04-24 11:23:21 +02:00
b1397d2034 api: server: check for unauthorized error
This functionality has been fixed by
7bca93218291767c5dd8782de0ad630dbcda9995 but then it has been broken
again by a793564b2591035aec5412fbcbcccf220c773a4c and finally refixed
here.

Basically the functionality was to prompt for login when trying to pull
from the official docker hub.

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 4316ae2ed33d158e1d8d994646a75e25a70d9320
Component: engine
2016-04-22 17:14:02 +02:00
03d17b8c5f Update code for latest engine-api
- Update CopyToContainer uses
- Use engine-api/types/versions instead of pkg/version

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 7534f17261d0bb74557ca2f7cd893d5b7b531d49
Component: engine
2016-04-19 16:56:54 +02:00
f5ac686743 Deprecated of docker ps since and before options for v1.12
Deprecated note https://github.com/docker/docker/blob/master/docs/deprecated.md#docker-ps-before-and-since-options

Signed-off-by: Wen Cheng Ma <wenchma@cn.ibm.com>
Upstream-commit: 91b715706493059d39c9f8b1d01c9d80ce1799d9
Component: engine
2016-04-19 18:13:55 +08:00
f8a8c81f4e Merge pull request #21657 from vdemeester/update-engine-api
Update engine api with required arguments
Upstream-commit: 7fd53f7c711474791ce4292326e0b1dc7d4d6b0f
Component: engine
2016-04-18 19:47:22 -07:00
145eac88d4 Merge pull request #20835 from cpuguy83/handle_stats_client_errors
Do not remove containers from stats list on err
Upstream-commit: 5314296c693d0d4d7f622940b48bc15e400032e3
Component: engine
2016-04-16 10:20:58 +01:00
8d9f1bcb22 Merge pull request #21939 from calavera/events_until_past
Get events until a time in the past.
Upstream-commit: 19a453e6b40177af31703f107131aae5ca81adf2
Component: engine
2016-04-15 15:33:41 -04:00
b48cb728b8 Update client code with api changes
Using new methods from engine-api, that make it clearer which element is
required when consuming the API.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: b9c94b70bf2f703f260844b3862a61f93dee6337
Component: engine
2016-04-15 12:48:01 +02:00
de95cbad37 Get events until a time in the past.
This change allow to filter events that happened in the past
without waiting for future events. Example:

docker events --since -1h --until -30m

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 55053d3537100eaeaad9c83b43e31f22d14fde7b
Component: engine
2016-04-14 16:22:16 -07:00
90af4a019b Do not remove containers from stats list on err
Before this patch, containers are silently removed from the stats list
on error. This patch instead will display `--` for all fields for the
container that had the error, allowing it to recover from errors.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: ff08036cc0d1b393106570a8c141e909d894f7d3
Component: engine
2016-04-13 16:36:34 -04:00
da8ff9f6e7 Merge pull request #21959 from coolljt0725/fix_21957
Fix docker load progressbar, fixes #21957
Upstream-commit: 348d90276802aac6c76126f2fe6866c521190ecd
Component: engine
2016-04-13 00:31:27 -04:00
94711fe63a Fix docker load progressbar, fixes #21957
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 96d7db665b06cc0bbede22d818c69dc5f6921f66
Component: engine
2016-04-12 22:45:42 -04:00
e1986078c7 Merge pull request #21897 from calavera/remove_authorization_refs_from_api
Move middleware to interfaces.
Upstream-commit: 9438572fc00f928ec83c884992d5492a7a68babb
Component: engine
2016-04-12 14:08:36 -07:00
8194e834c4 Move middleware to interfaces.
This makes separating middlewares from the core api easier.
As an example, the authorization middleware is moved to
it's own package.

Initialize all static middlewares when the server is created, reducing
allocations every time a route is wrapper with the middlewares.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 8d3467626ee26cad48ad84f2181552dce7afccb6
Component: engine
2016-04-11 09:19:27 -07:00
a5c656d2b9 Change HumanSize to BytesSize for memory output in docker stats.
This fix tries to fix the discrepancy between `docker stats` and
`docker run` where `docker run` uses RAMInBytes for all memory
related inputs but `docker stats` uses HumanSize for all memory
related outputs.

To be consistent, `docker stats` needs to use BytesSize for all
memory related outputs to conform to RAMInBytes in `docker run`.

This fix addresses this issue. As BytesSize is used, the test
cases needs to be adjusted to match `KiB/MiB/GiB` instead of
`KB/MB/GB`.

The documentation has also been updated.

This fix fixes #21765.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 0e3846e280195cb47c47a7739b475b281dd301cb
Component: engine
2016-04-08 20:01:50 +00:00
956e3c675e Remove reference package dependency from the api.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 47afe6bd0a0dc806c36d0978a8d3e23f75ef87fe
Component: engine
2016-04-07 15:01:23 -07:00
5da6bec3ad Merge pull request #21092 from WeiZhang555/fix-21064-detach-keys
Client print error when specify wrong detach keys
Upstream-commit: 5709f8e4227e0e1da333739c44003a3f47279bd5
Component: engine
2016-04-06 22:14:14 +02:00
0dfaed7e71 do not trim one char from {{.Names}} each time it is used in --format
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 68ade49adab15429168903f5600ab64ce7f7c8c5
Component: engine
2016-04-06 11:04:13 -07:00
97016757fb Let client print error when speicify wrong detach keys
Fix #21064

Let client print error message explicitly when user specifies wrong
detach keys.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 91e5bb954131904af150b06bd22b007559a8ce27
Component: engine
2016-04-04 15:35:55 +08:00
92dc3a4465 Fixing help text of "docker network --help" to be consistend
Changed from hashmap to multidimensional array as in "docker volume --help"
closes #21710

Signed-off-by: Robin Naundorf <r.naundorf@fh-muenster.de>
Upstream-commit: 737219bbdbd5c18a2f581c73ac740ea44266b82b
Component: engine
2016-04-01 14:14:09 +02:00
0d08181d47 Merge pull request #20410 from tkopczynski/20236-info-insecure-registry
Add insecure registries to docker info
Upstream-commit: 4a7bd7eaef0038b006cf23adface84081e5aab3b
Component: engine
2016-03-31 16:39:25 -07:00
da61313bb3 Merge pull request #21693 from cyli/fix-trusted-build-and-run
Request pull credentials when using trusted reference
Upstream-commit: f19f91d0da710b45603e1f3b95a3709c57cd888a
Component: engine
2016-03-31 16:35:06 -04:00
71d4646a90 Request pull credentials when using trusted reference
Signed-off-by: cyli <cyli@twistedmatrix.com>
Upstream-commit: df9cc3d9228cb07474dd046736c6f83513c4923d
Component: engine
2016-03-31 10:56:19 -07:00
7497562d8e Fix race between with event timer stopping early
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: b38cee9f9c79d1f12001348303b78462d99664ed
Component: engine
2016-03-31 09:49:07 -07:00
58855775ca Add insecure registries to docker info
Signed-off-by: Tomasz Kopczynski <tomek@kopczynski.net.pl>
Upstream-commit: 44a50abe7b16368bdc8b70e01cb095dc46cbbbaf
Component: engine
2016-03-31 08:27:24 +02:00
b960646c00 Remove builder dependency from the api.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: d12b7c7e3e5566f49f81189b757bcd0e4ef09956
Component: engine
2016-03-29 17:02:36 -07:00
922dd0a9e8 Merge pull request #21586 from calavera/remove_runconfig_from_routes
Remove runconfig package dependency from the API.
Upstream-commit: 1da40fb4badd116a7591dd2c19009146770c9a89
Component: engine
2016-03-29 08:40:49 -07:00
56103ffaad Remove runconfig package dependency from image and container routers.
Use an interface to specify the behavior of a configuration decoder.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: f0d26e1665f7552972db5b041554cc7b45bc3060
Component: engine
2016-03-28 16:23:51 -04:00
91e6a2df59 Remove runconfig dependency from network routes.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 3ca29823d42ab1e2b1ea76981ccc9aa11e858cb2
Component: engine
2016-03-28 16:23:50 -04:00
1660794bad Merge pull request #21523 from LK4D4/cancellable_routes
Embed context.Context to routes with usage of CloseNotify
Upstream-commit: be390c30cdde978ea1a5417875876e4f3ae52655
Component: engine
2016-03-28 12:44:07 -07:00
4d49388b9b Merge pull request #21566 from allencloud/upper-case-docker-info-display
upper case docker info details
Upstream-commit: dd7691423f685bc4d724224913556c7e2cf4bc56
Component: engine
2016-03-28 11:37:23 -07:00
64bbcab7a5 upper case docker info details
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 276a20dd426524c254e8b2a4cc9047bcc62fd321
Component: engine
2016-03-28 18:47:04 +08:00
406cc47308 use router.Cancellable for pull and push
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: c6ad1980a2eb2994940bdf7f79835ffdbed2b44d
Component: engine
2016-03-27 21:53:25 -07:00