Commit graph

1828 commits

Author SHA1 Message Date
Wang Xing
beca261578 Fix bug which mistakes 400 error for 500
Signed-off-by: Wang Xing <hzwangxing@corp.netease.com>
2016-05-19 20:01:55 +08:00
Arnaud Porterie
28452ca783 Merge pull request #22356 from allencloud/close-http-response-body-when-attaching
close http response body when attaching
2016-05-11 12:44:35 -10:00
Yong Tang
1f0d5aba50 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>
2016-05-07 14:25:28 -07:00
Vincent Demeester
08ec3606f1 Merge pull request #21889 from cpuguy83/logscmd_add_attrs
Add support for reading logs extra attrs
2016-05-07 20:26:33 +02:00
Brian Goff
bd9d14a07b 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>
2016-05-06 20:42:20 -04:00
cyli
d869d2b0a0 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>
2016-05-06 10:59:28 -07:00
allencloud
54d09c6c2d close http response body when attaching
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-05-06 16:58:22 +08:00
Mrunal Patel
97d95604e0 Update engine-api to 1fb8f09960cc32b9648495a422c960fb2a4f8a09
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2016-05-05 18:36:09 -04:00
Vincent Demeester
54ebe42de9
Fix #22240 do not pull all the tags implicitely
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-05-01 14:46:04 +02:00
David Calavera
90dfb3dacc Merge pull request #22372 from dnephin/cli_cleanup
Reorganize client and cli packages
2016-04-29 17:31:39 -07:00
Brian Goff
5c8950e84d 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>
2016-04-29 11:57:46 -04:00
fy2462
8bf5613c1a 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>
2016-04-28 16:39:00 +08:00
Daniel Nephin
30e3620eae Refactor cliconfig so that the default constructor can exist in the package.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-04-27 14:25:47 -04:00
Daniel Nephin
33c9edaf6c 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>
2016-04-27 14:25:47 -04:00
allencloud
e78884dafd make Insecure registries uppercase like other keys in docker info
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-04-25 18:44:34 +08:00
Vincent Demeester
4e5ad97f5b Merge pull request #22138 from wenchma/deprecated_since_before
Deprecated of docker ps since and before options for v1.12
2016-04-24 11:23:21 +02:00
Antonio Murdaca
4316ae2ed3 api: server: check for unauthorized error
This functionality has been fixed by
7bca932182 but then it has been broken
again by a793564b25 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>
2016-04-22 17:14:02 +02:00
Vincent Demeester
7534f17261
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>
2016-04-19 16:56:54 +02:00
Wen Cheng Ma
91b7157064 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>
2016-04-19 18:13:55 +08:00
David Calavera
7fd53f7c71 Merge pull request #21657 from vdemeester/update-engine-api
Update engine api with required arguments
2016-04-18 19:47:22 -07:00
Doug Davis
5314296c69 Merge pull request #20835 from cpuguy83/handle_stats_client_errors
Do not remove containers from stats list on err
2016-04-16 10:20:58 +01:00
Brian Goff
19a453e6b4 Merge pull request #21939 from calavera/events_until_past
Get events until a time in the past.
2016-04-15 15:33:41 -04:00
Vincent Demeester
b9c94b70bf
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>
2016-04-15 12:48:01 +02:00
David Calavera
55053d3537
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>
2016-04-14 16:22:16 -07:00
Brian Goff
ff08036cc0 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>
2016-04-13 16:36:34 -04:00
Tibor Vass
348d902768 Merge pull request #21959 from coolljt0725/fix_21957
Fix docker load progressbar, fixes #21957
2016-04-13 00:31:27 -04:00
Lei Jitang
96d7db665b Fix docker load progressbar, fixes #21957
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-04-12 22:45:42 -04:00
Alexander Morozov
9438572fc0 Merge pull request #21897 from calavera/remove_authorization_refs_from_api
Move middleware to interfaces.
2016-04-12 14:08:36 -07:00
David Calavera
8d3467626e
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>
2016-04-11 09:19:27 -07:00
Yong Tang
0e3846e280 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>
2016-04-08 20:01:50 +00:00
David Calavera
47afe6bd0a Remove reference package dependency from the api.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-04-07 15:01:23 -07:00
Vincent Demeester
5709f8e422 Merge pull request #21092 from WeiZhang555/fix-21064-detach-keys
Client print error when specify wrong detach keys
2016-04-06 22:14:14 +02:00
Victor Vieux
68ade49ada do not trim one char from {{.Names}} each time it is used in --format
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-04-06 11:04:13 -07:00
Zhang Wei
91e5bb9541 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>
2016-04-04 15:35:55 +08:00
Robin Naundorf
737219bbdb 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>
2016-04-01 14:14:09 +02:00
Sebastiaan van Stijn
4a7bd7eaef Merge pull request #20410 from tkopczynski/20236-info-insecure-registry
Add insecure registries to docker info
2016-03-31 16:39:25 -07:00
Tibor Vass
f19f91d0da Merge pull request #21693 from cyli/fix-trusted-build-and-run
Request pull credentials when using trusted reference
2016-03-31 16:35:06 -04:00
cyli
df9cc3d922 Request pull credentials when using trusted reference
Signed-off-by: cyli <cyli@twistedmatrix.com>
2016-03-31 10:56:19 -07:00
Tonis Tiigi
b38cee9f9c Fix race between with event timer stopping early
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-03-31 09:49:07 -07:00
Tomasz Kopczynski
44a50abe7b Add insecure registries to docker info
Signed-off-by: Tomasz Kopczynski <tomek@kopczynski.net.pl>
2016-03-31 08:27:24 +02:00
David Calavera
d12b7c7e3e Remove builder dependency from the api.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-03-29 17:02:36 -07:00
Arnaud Porterie
1da40fb4ba Merge pull request #21586 from calavera/remove_runconfig_from_routes
Remove runconfig package dependency from the API.
2016-03-29 08:40:49 -07:00
David Calavera
f0d26e1665 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>
2016-03-28 16:23:51 -04:00
David Calavera
3ca29823d4 Remove runconfig dependency from network routes.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-03-28 16:23:50 -04:00
David Calavera
be390c30cd Merge pull request #21523 from LK4D4/cancellable_routes
Embed context.Context to routes with usage of CloseNotify
2016-03-28 12:44:07 -07:00
David Calavera
dd7691423f Merge pull request #21566 from allencloud/upper-case-docker-info-display
upper case docker info details
2016-03-28 11:37:23 -07:00
allencloud
276a20dd42 upper case docker info details
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-03-28 18:47:04 +08:00
Alexander Morozov
c6ad1980a2 use router.Cancellable for pull and push
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2016-03-27 21:53:25 -07:00
Liron Levin
3c157713b3 Extend Docker authorization with TLS user information
Currently Docker authorization framework does not use any user
information, which already available in the Docker context for TLS
connection.
The purpose of this CR is to complete the existing authz work by adding
the basic client certificate details (SUBJECT_NAME) and authentication
method (TLS) to the authz request.

We think this should be the default behavior when no extended
authorization module is specified (currently WIP under #20883).

Signed-off-by: Liron Levin <liron@twistlock.com>
2016-03-27 15:53:55 +03:00
David Calavera
0524a9783d Merge pull request #21508 from vdemeester/remove-client-unused-method
Removing DockerCli.pullImage as it's never used
2016-03-25 13:52:49 -07:00