Commit graph

2086 commits

Author SHA1 Message Date
Vincent Demeester
4dafd107ad Merge pull request #22777 from WeiZhang555/wait-restarting
Bug fix: `docker run -i --restart always` hangs
2016-06-12 13:01:20 +02:00
Yong Tang
a72b45dbec Fix logrus formatting
This fix tries to fix logrus formatting by removing `f` from
`logrus.[Error|Warn|Debug|Fatal|Panic|Info]f` when formatting string
is not present.

This fix fixes #23459.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-06-11 13:16:55 -07:00
Alexander Morozov
ee8c512dc3 Merge pull request #23403 from WeiZhang555/split-utils
Move GetExitCode to package container and unexport it
2016-06-10 15:38:06 -07:00
Alexander Morozov
12970bef34 Merge pull request #23351 from thaJeztah/remove-go-1.4-fix
remove fallback for Go 1.4
2016-06-10 09:16:46 -07:00
Vincent Demeester
ad4e20cd92
Moving Image{Push,Pull}Privileged to trust.go
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-10 12:07:32 +02:00
Vincent Demeester
9640e3a451
Migrate push command to cobra
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-10 12:07:28 +02:00
Vincent Demeester
fa67b984f8
Migrate pull command to cobra
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-10 12:07:23 +02:00
Vincent Demeester
baf467722b
Migrate login & logout command to cobra
Also moves some common stuff around :
- `api/client/registry.go` for registry related
method (`ElectAuthServer`, …)
- `api/client/credentials.go` to interact with credentials

Migrate logout command to cobra

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-10 12:04:29 +02:00
Antonio Murdaca
a05536ff42 Merge pull request #23412 from vdemeester/migrate-load-and-save-to-cobra
Use spf13/cobra for docker load and save
2016-06-10 12:02:18 +02:00
Vincent Demeester
075b75fa14
Fix some context sharing/plumbing
With cobra switch (and maybe before), some context weren't *plumbed* the
right way, fixing that.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-09 17:58:10 +02:00
Vincent Demeester
6632fd2788
Migrate save command to cobra
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-09 17:38:20 +02:00
Vincent Demeester
8b1d40271f
Migrate load command to cobra
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-09 17:28:33 +02:00
Zhang Wei
c111b7eb3d Move GetExitCode to package container and unexport it
GetExitCode is used only by container package, so move it to package
container and unexport it

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-06-09 18:04:53 +08:00
Yong Tang
939a142c8d Use spf13/cobra for docker commit
This fix is part of the effort to convert commands to spf13/cobra #23211.

Thif fix coverted command `docker commit` to use spf13/cobra

NOTE: `RequiresMinMaxArgs()` has been renamed to `RequiresRangeArgs()`.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-06-08 19:00:58 -07:00
Vincent Demeester
e884a515e9 Merge pull request #23334 from WeiZhang555/cobra-stats
Migrate stats and events command to cobra
2016-06-08 23:50:46 +02:00
Vincent Demeester
8a22c4166b Merge pull request #23384 from jannickfahlbusch/fix-typos
Fix some typos
2016-06-08 23:46:47 +02:00
Brian Goff
6fd8c96f61 Merge pull request #23344 from pdalpra/timeout-as-time.Duration
Timeout as time.duration
2016-06-08 16:37:08 -04:00
Jannick Fahlbusch
e3490cdcc0 Fix some typos
Signed-off-by: Jannick Fahlbusch <git@jf-projects.de>
2016-06-08 21:59:34 +02:00
Alexander Morozov
3b08711bb7 Merge pull request #23343 from vdemeester/migrate-build-to-cobra
Use spf13/cobra for docker build
2016-06-08 11:59:48 -07:00
Pierre Dal-Pra
b29e8ea412 Use time.Duration for container restart/stop timeouts
Signed-off-by: Pierre Dal-Pra <dalpra.pierre@gmail.com>
2016-06-08 08:05:18 +02:00
Zhang Wei
04cdb8e602 Migrate stats and events command to cobra.
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-06-08 10:39:53 +08:00
Ben Firshman
322e2a7d05 Return remote API errors as JSON
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-06-07 18:45:27 -07:00
Vincent Demeester
13d101d53c Merge pull request #23333 from yongtang/23211-spf13-cobra-version
Use spf13/cobra for docker version
2016-06-07 23:46:01 +02:00
Brian Goff
ce96ce9e05 Merge pull request #23311 from WeiZhang555/cobra-rm
Migrate rm command to cobra
2016-06-07 17:05:21 -04:00
Sebastiaan van Stijn
6b46a56865
remove fallback for Go 1.4
Windows is now built using Go 1.6, so we no longer
need to have a fallback for Go 1.4.

This removes the fallback that was introduced in
6df3fc5175 /
https://github.com/docker/docker/pull/18553

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-06-07 22:38:02 +02:00
Sebastiaan van Stijn
08419313ec Merge pull request #23292 from yongtang/23211-spf13-cobra-images
Use spf13/cobra for docker images
2016-06-07 21:56:42 +02:00
Sebastiaan van Stijn
55a8bfa0e8 Merge pull request #23278 from yongtang/23211-spf13-cobra-tag
Use spf13/cobra for docker tag
2016-06-07 21:55:29 +02:00
Alexander Morozov
8cd6977f98 Merge pull request #23338 from vdemeester/23253-fix-create-run
Fix create command flags
2016-06-07 10:46:45 -07:00
Vincent Demeester
60f447b655
Migrate docker build to cobra
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-07 18:15:44 +02:00
Yong Tang
ba7324ffcb Use spf13/cobra for docker tag
This fix is part of the effort to convert commands to spf13/cobra #23211.

Thif fix coverted command `docker tag` to use spf13/cobra

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-06-07 08:12:49 -07:00
Yong Tang
bc82e51d77 Use spf13/cobra for docker version
This fix is part of the effort to convert commands to spf13/cobra #23211.

Thif fix coverted command `docker version` to use spf13/cobra

NOTE: Most of the commands like `run`, `images` etc. goes to packages of
`container`, `image`, `network`, etc. Didn't find a good place for
`docker version` so just use the package `client` for now.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-06-07 08:11:34 -07:00
Yong Tang
65a0034c67 Use spf13/cobra for docker images
This fix is part of the effort to convert commands to spf13/cobra #23211.

Thif fix coverted command `docker images` to use spf13/cobra

NOTE: As part of this fix, a new function `RequiresMaxArgs()`
has been defined in `cli/required.go`. This func returns an
error if there is not at most max args

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-06-07 08:10:49 -07:00
Zhang Wei
7702f39fe8 Migrate rm command to cobra
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-06-07 22:19:16 +08:00
Sebastiaan van Stijn
88323c861a Merge pull request #23307 from WeiZhang555/cobra-restart
Migrate restart command to cobra
2016-06-07 15:28:35 +02:00
Vincent Demeester
aa00520fc8
Fix create command flags
Any command that expects extra flags after positional args needs to set flags.SetInterspersed(false).

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-07 14:11:11 +02:00
Sebastiaan van Stijn
4f9e2f9fb4 Merge pull request #23297 from WeiZhang555/cobra-kill
Migrate kill command to cobra
2016-06-07 13:44:22 +02:00
Sebastiaan van Stijn
f061f556f2 Merge pull request #23269 from vdemeester/migrate-import-to-cobra
Use spf13/cobra for docker import
2016-06-07 13:07:30 +02:00
Vincent Demeester
148d2b8e4a Merge pull request #22149 from vdemeester/deprecated-copy-endpoint
Deprecate /containers/(id or name)/copy endpoint
2016-06-07 12:50:04 +02:00
Zhang Wei
732f08a822 Migrate kill command to cobra
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-06-07 17:20:33 +08:00
Zhang Wei
264462d601 Migrate restart command to cobra
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-06-07 17:13:53 +08:00
Vincent Demeester
f9021838b6 Merge pull request #23226 from HackToday/fixnetinspectId
Fix the network inspect id
2016-06-07 10:02:17 +02:00
Vincent Demeester
6d4a7213e6 Merge pull request #23285 from yongtang/23211-spf13-cobra-pause
Use spf13/cobra for docker pause
2016-06-07 10:01:42 +02:00
Vincent Demeester
804536df25 Merge pull request #23291 from yongtang/23211-spf13-cobra-history
Use spf13/cobra for docker history
2016-06-07 10:00:39 +02:00
Vincent Demeester
e83dad090a Merge pull request #23290 from yongtang/23211-spf13-cobra-rename
Use spf13/cobra for docker rename
2016-06-07 08:28:27 +02:00
Brian Goff
ab821f9f9b Merge pull request #23274 from WeiZhang555/cobra-attach
Move attach command to cobra
2016-06-06 21:16:45 -04:00
Yong Tang
70f7ccb304 Use spf13/cobra for docker rename
This fix is part of the effort to convert commands to spf13/cobra #23211.

Thif fix coverted command `docker rename` to use spf13/cobra

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-06-06 12:39:11 -07:00
Yong Tang
91731706c2 Use spf13/cobra for docker pause
This fix is part of the effort to convert commands to spf13/cobra #23211.

Thif fix coverted command `docker pause` to use spf13/cobra

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-06-06 12:37:18 -07:00
Alexander Morozov
5ce2f14f9b Merge pull request #23306 from yongtang/23211-spf13-cobra-top
Use spf13/cobra for docker top
2016-06-06 10:14:10 -07:00
Vincent Demeester
52da20b839 Merge pull request #23286 from yongtang/23211-spf13-cobra-port
Use spf13/cobra for docker port
2016-06-06 18:55:37 +02:00
Kai Qiang Wu(Kennan)
864e362aa0 Fix the network inspect id
This fixes #22231

Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
2016-06-06 15:26:07 +00:00
Yong Tang
a76d387cda Use spf13/cobra for docker history
This fix is part of the effort to convert commands to spf13/cobra #23211.

Thif fix coverted command `docker history` to use spf13/cobra

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-06-06 08:03:07 -07:00
Zhang Wei
eceb8625a9 Move attach command to cobra.
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-06-06 22:28:57 +08:00
Yong Tang
0f38669267 Use spf13/cobra for docker top
This fix is part of the effort to convert commands to spf13/cobra #23211.

Thif fix coverted command `docker top` to use spf13/cobra

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-06-06 06:38:43 -07:00
Yong Tang
d5971c230d Use spf13/cobra for docker port
This fix is part of the effort to convert commands to spf13/cobra #23211.

Thif fix coverted command `docker port` to use spf13/cobra

Note: As part of this fix, a new function `RequiresMinMaxArgs(min int, max int)`
has been added in cli/required.go. This function restrict the args
to be at least min and at most max.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-06-06 05:32:34 -07:00
Yong Tang
82f84a67d6 Use spf13/cobra for docker wait
This fix is part of the effort to convert commands to spf13/cobra #23211.

Thif fix coverted command `docker wait` to use spf13/cobra

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-06-06 05:09:41 -07:00
Vincent Demeester
7878705dcc
Fix TestDiffEmptyArgClientError O:)
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-06 13:58:29 +02:00
Vincent Demeester
9d2e8abd30
Migrate import command to cobra
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-06 13:58:23 +02:00
Sebastiaan van Stijn
07a7c0632f Merge pull request #23210 from vdemeester/migrate-network-command-to-cobra
Use spf13/cobra for docker network and subcommands
2016-06-06 13:51:57 +02:00
Vincent Demeester
9d449d89f7 Merge pull request #23129 from WeiZhang555/print-detailed-error
Print original error for `start`
2016-06-06 13:43:52 +02:00
Vincent Demeester
4bd202b00f
Migrate network command to cobra
- Migrates network command and subcommands (connect, create, disconnect,
  inspect, list and remove) to spf13/cobra
- Create a RequiredExactArgs helper function for command that require an
  exact number of arguments.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-06 10:28:52 +02:00
Vincent Demeester
731bae6749 Merge pull request #23284 from yongtang/23211-spf13-cobra-logs
Use spf13/cobra for docker logs
2016-06-06 09:06:51 +02:00
Vincent Demeester
2becfab55f Merge pull request #23283 from yongtang/23211-spf13-cobra-diff
Use spf13/cobra for docker diff
2016-06-06 09:05:18 +02:00
Vincent Demeester
c35d9f2611 Merge pull request #23268 from WeiZhang555/cobra-start
Migrate start command to cobra
2016-06-06 08:59:42 +02:00
Zhang Wei
c498d4700d Bug fix: docker run -i --restart always hangs.
e.g.
```
$ docker run -i --restart always busybox sh
pwd
/
exit 11

<...hang...>
```

This is because Attach(daemon side) and Run(client side) both hangs on
WaitStop, if container is restarted too quickly, wait won't have chance
to get exit signal.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-06-06 10:16:07 +08:00
Zhang Wei
b4740e3021 Log and print original error for start
Currently `start` will hide some errors and throw a consolidated error,
which will make it hard to debug because developer can't find the
original error.

This commit allow daemon to log original errors first.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-06-06 10:13:49 +08:00
Zhang Wei
4f3625a288 Migrate start command to cobra
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-06-06 09:53:18 +08:00
Yong Tang
8ea7733a63 Use spf13/cobra for docker unpause
This fix is part of the effort to convert commands to spf13/cobra #23211.

Thif fix coverted command `docker unpause` to use spf13/cobra

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-06-05 17:29:52 -07:00
Yong Tang
4f4b59cc43 Use spf13/cobra for docker logs
This fix is part of the effort to convert commands to spf13/cobra #23211.

Thif fix coverted command `docker logs` to use spf13/cobra

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-06-05 15:51:35 -07:00
Alexander Morozov
e94be2f639 Merge pull request #23242 from vdemeester/migrate-rmi-to-cobra
Use spf13/cobra for docker rmi
2016-06-05 15:29:01 -07:00
Yong Tang
5899afae52 Use spf13/cobra for docker diff
This fix is part of the effort to convert commands to spf13/cobra #23211.

Thif fix coverted command `docker diff` to use spf13/cobra

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-06-05 15:13:55 -07:00
Vincent Demeester
60e48bd6bd
Use spf13/cobra for docker rmi
Moves image command rmi to `api/client/image/remove.go` and use cobra :)

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-05 22:40:35 +02:00
Brian Goff
1a1083ae75 Merge pull request #23247 from thaJeztah/carry-22033-docker-ps-format-output
[Carry 22033] Add a check for size field in custom format string
2016-06-05 16:39:22 -04:00
Vincent Demeester
b259558336 Merge pull request #23276 from yongtang/23211-spf13-cobra-stop
Use spf13/cobra for docker stop
2016-06-05 22:37:15 +02:00
Sebastiaan van Stijn
c764234c3b Merge pull request #23267 from vdemeester/migrate-export-to-cobra
Use spf13/cobra for docker export
2016-06-05 20:05:51 +02:00
Yong Tang
63d66d2796 Use spf13/cobra for docker stop
This fix is part of the effort to convert commands to spf13/cobra #23211.

Thif fix coverted command `docker stop` to use spf13/cobra

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-06-05 10:25:21 -07:00
Vincent Demeester
372063ce1b
Deprecated the old 3-args form of docker import
It's been deprecated since November 2013 and v0.6.7. Removing the cli
side of it.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-05 18:07:34 +02:00
Vincent Demeester
b25e64183c
Migrate export command to cobra
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-05 16:42:19 +02:00
Daniel Nephin
5ab2434225 Convert 'docker create' to use cobra and pflag
Return the correct status code on flag parsins errors.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-06-04 13:57:30 +02:00
Daniel Nephin
a77f2450c7 Convert 'docker run' to a cobra command and to use pflags
Move container options into a struct so that tests should pass.
Remove unused FlagSet arg from Parse
Disable interspersed args on docker run

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-06-04 13:55:35 +02:00
Paulo Ribeiro
55cdb6dcd0
Add a check for size field in custom format string
This fix addresses an issue where including the `{{.Size}}` format
field in conjunction with `docker ps --format`, without the `--size`
flag, would not correctly display the size of containers.

This is done by doing a check on the custom format string, and setting
the size flag on the options struct if the field is found. This struct
gets passed to the engine API which then generates the correct query.

An integration test is included which runs `docker ps --format "table
{{.Size}}"` without `--size`, and checks that the returned output is
not `0 B`.

Fixes #21991

As suggested by @cpuguy83, a parser is implemented to process the format
string as a template, and then traverses the template tree to determine
if `.Size` was called.

This was then reworked by making use of template execution with a
pre-processor struct that will set the `--size` option if the template
calls for the field.

The pre-processor now also sets a boolean in the context passed to the
writer. There is an integration test for this that calls `docker ps
--size --format "{{.Size}}"` and then checks that `size: {{.Size}}` is
not appended, as it would with previous behavior.

Finally, a change was made to the formatter to not automatically
add a `{{.Size}}` if a custom format is provided.

Signed-off-by: Paulo Ribeiro <paigr.io@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-06-03 21:59:10 +02:00
Vincent Demeester
a11ef10631
Use spf13/cobra for docker search
- Move image command search to `api/client/image/search.go`
- Use cobra :)

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-03 19:50:01 +02:00
Vincent Demeester
428328908d
Deprecate /containers/(id or name)/copy endpoint
This endpoint has been deprecated since 1.8. Return an error starting
from this API version (1.24) in order to make sure it's not used for the
next API version and so that we can remove it some times later.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-03 19:38:03 +02:00
Sebastiaan van Stijn
020a86b3d9 Merge pull request #23107 from yongtang/23055-docker-search-limit
Add `--limit` option to `docker search`
2016-06-03 14:25:42 +02:00
Sebastiaan van Stijn
766550385d Merge pull request #22715 from allencloud/add-trace-http-pprof
add trace in docker engine's pprof to show execution trace in binary form
2016-06-03 13:22:13 +02:00
Yong Tang
92f10fe228 Add --limit option to docker search
This fix tries to address the issue raised in #23055.
Currently `docker search` result caps at 25 and there is
no way to allow getting more results (if exist).

This fix adds the flag `--limit` so that it is possible
to return more results from the `docker search`.

Related documentation has been updated.

Additional tests have been added to cover the changes.

This fix fixes #23055.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-06-02 19:12:20 -07:00
Sven Dowideit
98c245c9e6 Merge pull request #23193 from allencloud/fix-typos
use grep to find all a/an typos
2016-06-02 18:45:08 -07:00
Thomas Leonard
b6c7becbfe
Add support for user-defined healthchecks
This PR adds support for user-defined health-check probes for Docker
containers. It adds a `HEALTHCHECK` instruction to the Dockerfile syntax plus
some corresponding "docker run" options. It can be used with a restart policy
to automatically restart a container if the check fails.

The `HEALTHCHECK` instruction has two forms:

* `HEALTHCHECK [OPTIONS] CMD command` (check container health by running a command inside the container)
* `HEALTHCHECK NONE` (disable any healthcheck inherited from the base image)

The `HEALTHCHECK` instruction tells Docker how to test a container to check that
it is still working. This can detect cases such as a web server that is stuck in
an infinite loop and unable to handle new connections, even though the server
process is still running.

When a container has a healthcheck specified, it has a _health status_ in
addition to its normal status. This status is initially `starting`. Whenever a
health check passes, it becomes `healthy` (whatever state it was previously in).
After a certain number of consecutive failures, it becomes `unhealthy`.

The options that can appear before `CMD` are:

* `--interval=DURATION` (default: `30s`)
* `--timeout=DURATION` (default: `30s`)
* `--retries=N` (default: `1`)

The health check will first run **interval** seconds after the container is
started, and then again **interval** seconds after each previous check completes.

If a single run of the check takes longer than **timeout** seconds then the check
is considered to have failed.

It takes **retries** consecutive failures of the health check for the container
to be considered `unhealthy`.

There can only be one `HEALTHCHECK` instruction in a Dockerfile. If you list
more than one then only the last `HEALTHCHECK` will take effect.

The command after the `CMD` keyword can be either a shell command (e.g. `HEALTHCHECK
CMD /bin/check-running`) or an _exec_ array (as with other Dockerfile commands;
see e.g. `ENTRYPOINT` for details).

The command's exit status indicates the health status of the container.
The possible values are:

- 0: success - the container is healthy and ready for use
- 1: unhealthy - the container is not working correctly
- 2: starting - the container is not ready for use yet, but is working correctly

If the probe returns 2 ("starting") when the container has already moved out of the
"starting" state then it is treated as "unhealthy" instead.

For example, to check every five minutes or so that a web-server is able to
serve the site's main page within three seconds:

    HEALTHCHECK --interval=5m --timeout=3s \
      CMD curl -f http://localhost/ || exit 1

To help debug failing probes, any output text (UTF-8 encoded) that the command writes
on stdout or stderr will be stored in the health status and can be queried with
`docker inspect`. Such output should be kept short (only the first 4096 bytes
are stored currently).

When the health status of a container changes, a `health_status` event is
generated with the new status. The health status is also displayed in the
`docker ps` output.

Signed-off-by: Thomas Leonard <thomas.leonard@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-06-02 23:58:34 +02:00
Vincent Demeester
6b7f12650d
Update ContainerStart calls to use options now
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-02 16:56:13 +02:00
allencloud
c1be45fa38 fix typos
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-06-02 17:17:22 +08:00
Alexander Morozov
28676fc04b Merge pull request #22769 from dnephin/integrate_cobra
Use spf13/cobra for the cli
2016-06-01 14:18:23 -07:00
Yong Tang
4455ec14b8 Remove deprecated -f flag on docker tag
The -f flag on docker tag has been deprecated in docker 1.10 and
is expected to be removed in docker 1.12.

This fix removed the -f flag on docker tag and also updated
deprecated.md.

NOTE: A separate pull request for engine-api has been opened to
cover the related changes.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-06-01 09:44:25 -07:00
Shijiang Wei
0a8386c8be remove deprecated feature of passing HostConfig at API container start
Signed-off-by: Shijiang Wei <mountkin@gmail.com>
2016-06-01 22:25:17 +08:00
Daniel Nephin
fc5a4514fb Use Args in cobra.Command to validate args.
Also re-use context.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-05-31 15:43:16 -07:00
Daniel Nephin
667dcb0e8e Update usage and help to (almost) match the existing docker behaviour
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-05-31 14:41:37 -07:00
Daniel Nephin
69264beb40 Migrate volume commands to cobra.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-05-31 14:41:37 -07:00
Daniel Nephin
6bc3e23f65 Refactor cli inspector to support new inspects.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-05-31 14:41:37 -07:00
Vincent Demeester
34e0a01de2 Merge pull request #23091 from allencloud/print-network-name-when-rm
print network name when rm successfully
2016-05-30 13:33:29 +02:00
allencloud
27ebd79222 print network name when rm successfully
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-05-29 23:42:45 +08:00
Sebastiaan van Stijn
4a031f1f80 Merge pull request #22621 from yongtang/05092016-remove-deprecated-command-line-short-variant-options
Un-deprecated command line short variant options of `-c`
2016-05-27 23:12:08 +02:00
Vincent Demeester
24d2ee8c48 Merge pull request #22984 from Microsoft/jjh/ttymessage
Better error on attach no tty
2016-05-27 16:57:36 +02:00
Yong Tang
fea7acf0e9 Un-deprecated command line short variant options of -c.
Since 1.9, the following short variant options have been
deprecated in favor of their long variants:
`docker run -c (--cpu-shares)`
`docker build -c (--cpu-shares)`
`docker create -c (--cpu-shares)`
`docker update -c (--cpu-shares)`

However, `-c` is still widely used and is considered as
a convenient option for swarm (see #16271).

This fix undeprecated the command line short
variant options of `-c` and updated the deprecated.md.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-05-26 08:22:27 -07:00
Sebastiaan van Stijn
75109b32db Merge pull request #22861 from vdemeester/daemon-images-search-refactoring
Daemon images search refactoring
2016-05-26 12:34:31 +02:00
John Howard
f7541b00b0 Better error on attach no tty
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-05-25 13:32:48 -07:00
John Howard
541fba13fc Error login from non TTY
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-05-25 09:29:50 -07:00
Vincent Demeester
636c276f67
Add Unit test to daemon.SearchRegistryForImages…
… and refactor a little bit some daemon on the way.

- Move `SearchRegistryForImages` to a new file (`daemon/search.go`) as
  `daemon.go` is getting pretty big.
- `registry.Service` is now an interface (allowing us to decouple it a
  little bit and thus unit test easily).
- Add some unit test for `SearchRegistryForImages`.
- Use UniqueExactMatch for search filters
- And use empty restore id for now in client.ContainerStart.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-05-24 11:07:11 +02:00
Vincent Demeester
4c7f0d268f
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>
2016-05-21 15:57:57 +02:00
Fabrizio Soppelsa
e009ebdf4c
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>
2016-05-20 13:41:28 +02:00
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
allencloud
8879458faa add trace in docker engine's pprof to show execution trace in binary form
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-05-13 15:24:44 +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
Alexander Morozov
62c9e62edc use router.Cancellable instead of direct CloseNotify
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2016-03-25 11:33:54 -07:00
Tõnis Tiigi
e2221d1f37 Merge pull request #21468 from coolljt0725/remove_useless_log
Do not return error on hijacked connection for docker exec
2016-03-25 10:50:43 -07:00
Alexander Morozov
bdd9388c42 api/server/router: add Cancellable function
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2016-03-25 10:19:23 -07:00
Vincent Demeester
8f4b7a3361 Removing DockerCli.pullImage as it's never used
This function is never used nor exported. It has been superseeded by
pullImageCustomOut.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-03-25 17:41:19 +01:00
Alexander Morozov
f2401a0f69 builder: replace cancelled channel with net/context
Also stop execution of run immediately if request was cancelled.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2016-03-25 08:19:29 -07:00
Alexander Morozov
641bd7652f Merge pull request #20589 from coolljt0725/fix_restore_terminal
cli: move setRawTerminal and restoreTerminal to holdHijackedConnection
2016-03-24 22:42:24 -07:00
Lei Jitang
66d3dcc6f7 cli: move setRawTerminal and restoreTerminal to holdHijackedConnection
In this way, we can restore the Terminal as soon as possible once the hijacked
connection end. This not only fix weird output if cli enable -D, but also
remove duplicate code.

Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-03-24 21:25:50 -04:00
Alexander Morozov
6748ecb005 Merge pull request #21456 from calavera/remove_unecessary_hardcoded_version
Remove unnecessary hardcoded version.
2016-03-24 14:31:59 -07:00
Vincent Demeester
2b6b2e1af8 Merge pull request #21464 from coolljt0725/cleanup_dot
Cleanup: remove redundant period
2016-03-24 18:34:20 +01:00
David Calavera
accf28a7db Remove unnecessary hardcoded version.
The server configuration already keeps the current version
if the daemon. This patch changes the middleware logic
to use it rather than using the global value.

This removes the dockerversion package dependency from the api.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-03-24 12:33:40 -04:00
Lei Jitang
d6ccc0e09f Do not return error on hijacked connection for docker exec
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-03-24 08:52:13 -04:00
Lei Jitang
cb5b8767b6 Cleanup: remove redundant period
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-03-24 08:26:04 -04:00
Sebastiaan van Stijn
5ef04b1c6d Merge pull request #21268 from calavera/remove_dockerfile_from_api
Remove dockerfile dependency from the API.
2016-03-23 19:34:21 -07:00
Tibor Vass
928ea1e957 Bump API Version to v1.24
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-03-23 12:26:23 -04:00
David Calavera
fb1365639e Merge pull request #21406 from LK4D4/fix_streams_race
builder: synchronize stderr and stdout
2016-03-22 17:15:01 -07:00
Tibor Vass
8b8fcb796f Merge pull request #21303 from riyazdf/notary-vendor-docker1.11
vendor notary for docker1.11
2016-03-22 17:57:17 -04:00
Alexander Morozov
3eb0a80f29 builder: synchronize stderr and stdout
it's concurrent streams and should be synchronized before writing to response.
Otherwise there will be race in writing to *bufio.Writer in
net/http.response.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2016-03-22 13:57:29 -07:00
Tibor Vass
53d2e5e9d7 Merge pull request #21270 from ehazlett/resource-labels
Add Label support for Images (build), Networks and Volumes on Creation
2016-03-22 15:12:33 -04:00
Riyaz Faizullabhoy
ab3772f72f vendor notary for docker1.11
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-03-22 11:28:19 -07:00
Evan Hazlett
fc214b4408 add label support for build, networks and volumes
build: implement --label

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

network: allow adding labels on create

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

volume: allow adding labels on create

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

add tests for build, network, volume

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

vendor: libnetwork and engine-api bump

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2016-03-22 11:49:06 -04:00
Vincent Demeester
666563b190 Merge pull request #21046 from cyli/use-notary-cli
Sign all first-level delegation roles when doing a trusted push
2016-03-22 07:42:21 +01:00
Aaron Lehmann
c44e7a3e63 Pass upstream client's user agent through to registry on operations beyond pulls
This adds support for the passthrough on build, push, login, and search.

Revamp the integration test to cover these cases and make it more
robust.

Use backticks instead of quoted strings for backslash-heavy string
contstands.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-03-21 14:31:47 -07:00
Arnaud Porterie
278d3962a8 Merge pull request #21306 from mgoelzer/issue20001-nodeps
Pass upstream client's user agent through to registry on image pulls
2016-03-21 14:26:59 -07:00
cyli
623ccc2f31 Pull, Pull-A, and Build will only pull tags from the targets role or the targets/releases role.
It will ignore tags in all other delegation roles.

Signed-off-by: cyli <cyli@twistedmatrix.com>
2016-03-21 10:56:49 -07:00
Riyaz Faizullabhoy
ca57f4e6a8 Add test for targets/releases preference when pulling
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-03-21 10:56:42 -07:00
cyli
497a58e6e4 Trusted push now adds the tag to every first level delegation role for which we have keys
and for which the tag conforms to path restrictions.

Signed-off-by: cyli <cyli@twistedmatrix.com>
2016-03-21 10:56:09 -07:00
Antonio Murdaca
5008a34072 Merge pull request #21333 from cpuguy83/sigpipe
Don't forward SIGPIPE from client to container
2016-03-21 15:09:13 +01:00
Doug Davis
7942160638 Add the name of the exe that's trying to be executed
so that the user knows what's not in the container but should be.
Its not always easy for the user to know what exact command is being run
when the 'docker run' is embedded deep in something else, like a Makefile.
Saw this while dealing with the containerd migration.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2016-03-20 18:15:46 -07:00
Mike Goelzer
d1502afb63 Pass upstream client's user agent through to registry on image pulls
Changes how the Engine interacts with Registry servers on image pull.
Previously, Engine sent a User-Agent string to the Registry server
that included only the Engine's version information.  This commit
appends to that string the fields from the User-Agent sent by the
client (e.g., Compose) of the Engine.  This allows Registry server
operators to understand what tools are actually generating pulls on
their registries.

Signed-off-by: Mike Goelzer <mgoelzer@docker.com>
2016-03-20 04:30:09 -07:00
Jess Frazelle
b77573f48e Merge pull request #21274 from jfrazelle/fix-variables-that-werent-being-used
fix variables that werent being called
2016-03-18 18:03:15 -07:00
Brian Goff
81707de23f Don't forward SIGPIPE from client to container
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-03-18 16:50:18 -04:00
Tonis Tiigi
9c4570a958 Replace execdrivers with containerd implementation
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-03-18 13:38:32 -07:00
Vincent Demeester
6c6363c726 Merge pull request #21269 from mlaventure/inspect-bind-mounts
Update inspect/ps to properly handle bind mounts
2016-03-18 20:52:02 +01:00
allencloud
f1d34ac2eb fix typos in several files
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-03-18 12:51:57 +08:00
Kenfe-Mickael Laventure
cb8cc56c22 Fix inspect to print bind mounts source path instead of an empty string
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-03-17 15:42:45 -07:00
Jessica Frazelle
0e025b4bb1
fix variables that werent being called
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2016-03-17 13:19:55 -07:00
Alexander Morozov
04c7d94c71 Merge pull request #21273 from jfrazelle/remove-dead-code
remove dead code
2016-03-17 09:16:02 -07:00
David Calavera
b1e9a5eaf1 Merge pull request #21258 from runcom/res.body.leaks
*: fix response body leaks
2016-03-16 19:20:10 -07:00
Jessica Frazelle
8dd88afb5b
remove dead code
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2016-03-16 19:15:14 -07:00
David Calavera
93e02efa90 Remove dockerfile dependency from the API.
Move context parsing to the backend.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-03-16 22:06:29 -04:00
Vincent Demeester
8567286ed6 Update api/client file to use context
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-03-16 20:25:09 +01:00
Antonio Murdaca
f0d83c4cdb *: fix response body leaks
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-03-16 17:15:42 +01:00