Commit graph

1766 commits

Author SHA1 Message Date
Vincent Demeester
fc6122a947 Move validateContextDirectory to builder package.
This feels like it's where it belongs and it makes it exported
again (which is needed for libcompose that was using it before 1.10).

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-02-09 22:19:09 +01:00
Brian Goff
a77b7dd227 cleanup attach api calls
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-02-09 14:26:51 -05:00
Brian Goff
ae4ee974e8 Move stream flushes to backend
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-02-09 14:25:02 -05:00
David Calavera
06d8f504f7 Move backend types to their own package.
- Remove duplicated structs that we already have in engine-api.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-02-08 12:42:17 -05:00
Lukas Waslowski
dd93571c69 Decouple the "container" router from the actual daemon implementation.
This is done by moving the following types to api/types/config.go:
  - ContainersConfig
  - ContainerAttachWithLogsConfig
  - ContainerWsAttachWithLogsConfig
  - ContainerLogsConfig
  - ContainerStatsConfig

Remove dependency on "version" package from types.ContainerStatsConfig.
Decouple the "container" router from the "daemon/exec" implementation.

* This is done by making daemon.ContainerExecInspect() return an interface{}
value. The same trick is already used by daemon.ContainerInspect().

Improve documentation for router packages.
Extract localRoute and router into separate files.
Move local.router to image.imageRouter.

Changes:
  - Move local/image.go to image/image_routes.go.
  - Move local/local.go to image/image.go
  - Rename router to imageRouter.
  - Simplify imports for image/image.go (remove alias for router package).

Merge router/local package into router package.
Decouple the "image" router from the actual daemon implementation.
Add Daemon.GetNetworkByID and Daemon.GetNetworkByName.
Decouple the "network" router from the actual daemon implementation.

This is done by replacing the daemon.NetworkByName constant with
an explicit GetNetworkByName method.

Remove the unused Daemon.GetNetwork method and the associated constants NetworkByID and NetworkByName.

Signed-off-by: Lukas Waslowski <cr7pt0gr4ph7@gmail.com>
Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-02-08 11:30:57 -05:00
Lei Jitang
fae09e2569 Add progress bar to docker load
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-02-05 02:24:23 -05:00
Brian Goff
18204ea616 Merge pull request #19357 from chenchun/internal
Display `internal` flag on `network inspect`
2016-02-04 16:31:12 -05:00
David Calavera
fe53be4e17 Apply context changes to the client.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-02-04 13:59:57 -05:00
Chun Chen
c199506b59 Display internal flag on network inspect
Also adds internal network tests for bridge network

Signed-off-by: Chun Chen <ramichen@tencent.com>
2016-02-04 15:28:37 +08:00
Arnaud Porterie
243d0d6bbe Remove unnecessary call to /info
Avoid using the `/info` endpoint in the `login` and `logout` workflows
when the Registry endpoint is overriden by the user through the command
line.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2016-02-03 13:10:25 -08:00
Tibor Vass
7e236e623b Merge pull request #19975 from aaronlehmann/resolve-auth-config
Introduce a client-side version of resolveAuthConfig
2016-02-03 15:57:29 -05:00
Aaron Lehmann
ff17cd0bf0 Introduce a client-side version of resolveAuthConfig
This is similar to the version in the registry package, but uses the
daemon's default index (as opposed to the default for the client's
platform) if using the "official index".

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-02-03 11:01:29 -08:00
Arnaud Porterie
8ee7ad2209 Enable cross-platforms logout from Registry
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2016-02-03 10:32:22 -08:00
Zhang Wei
894266c1bb Remove redundant error message
Currently some commands including `kill`, `pause`, `restart`, `rm`,
`rmi`, `stop`, `unpause`, `udpate`, `wait` will print a lot of error
message on client side, with a lot of redundant messages, this commit is
trying to remove the unuseful and redundant information for user.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-02-03 15:45:20 +08:00
Alexander Morozov
1bc4c99372 Merge pull request #19761 from HackToday/enhancesortattr
Sort the attributes for events
2016-02-02 16:08:23 -08:00
Alexander Morozov
83ee24e52b Merge pull request #19911 from Microsoft/jstarks/npipe
Windows: Add support for named pipe protocol
2016-02-02 15:59:45 -08:00
Arnaud Porterie
85a32baa3b Merge pull request #19901 from calavera/debug_cli_tests
Always show debug information in the info output
2016-02-02 15:56:55 -08:00
Victor Vieux
0fd9b4067d fix error message on version too low
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-02-02 14:16:15 -08:00
David Calavera
9f315dd328 Add regression tests for client debug flag.
- Add client debug info to the `docker info` command.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-02-02 16:57:36 -05:00
John Starks
0906195fbb Windows: Add support for named pipe protocol
This adds an npipe protocol option for Windows hosts, akin to unix
sockets for Linux hosts. This should become the default transport
for Windows, but this change does not yet do that.

It also does not add support for the client side yet since that
code is in engine-api, which will have to be revendored separately.

Signed-off-by: John Starks <jostarks@microsoft.com>
2016-02-01 19:46:30 -08:00
Tibor Vass
ec6bfebc0f Merge pull request #19907 from tiborvass/tty-debug
Prevent stdin from hanging
2016-02-01 21:57:32 -05:00
Brian Goff
3c0c115ec8 Merge pull request #19896 from calavera/same_rm_error_message
Make error message consistent when removing containers fail.
2016-02-01 21:19:42 -05:00
Tibor Vass
51795c0836 Skip Close()-ing stdin on Darwin. The Return.
This was accidentally removed in https://github.com/docker/docker/pull/16289
Now adding it back.

Signed-off-by: Tibor Vass <tibor@docker.com>
2016-02-01 20:38:01 -05:00
Tibor Vass
19eaa71e85 Merge pull request #19891 from icecrime/windows_login_issue
Enable cross-platforms login to Registry
2016-02-01 19:50:54 -05:00
Arnaud Porterie
680cf1c8f4 Merge pull request #19553 from anusha-ragunathan/rm-daemonbuilder
Remove package daemonbuilder.
2016-02-01 13:20:00 -08:00
David Calavera
245d6e83a9 Merge pull request #19416 from mlaventure/warn-on-rm-detach
Print an info message when detaching a container started with --rm
2016-02-01 13:17:23 -08:00
David Calavera
50de9fdff1 Make error message consistent when removing containers fail.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-02-01 15:32:50 -05:00
Arnaud Porterie
960710bd81 Enable cross-platforms login to Registry
Use a daemon-defined Registry URL for `docker login`. This allows a
Windows client interacting with a Linux daemon to properly use the
default Registry endpoint instead of the Windows specific one.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2016-02-01 11:18:54 -08:00
Anusha Ragunathan
9c332b164f Remove package daemonbuilder.
Currently, daemonbuilder package (part of daemon) implemented the
builder backend. However, it was a very thin wrapper around daemon
methods and caused an implementation dependency for api/server build
endpoint. api/server buildrouter should only know about the backend
implementing the /build API endpoint.

Removing daemonbuilder involved moving build specific methods to
respective files in the daemon, where they fit naturally.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-02-01 09:57:38 -08:00
Kai Qiang Wu(Kennan)
746f6af9aa Sort the attributes for events
This is add support for #19559
We tried sort it in client side, and it sort follow go
sort : sorts a slice of strings in increasing order.

Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
2016-02-01 00:18:33 +00:00
Brian Goff
d695cf8de7 Merge pull request #19638 from runcom/remove-redunant-function
cleanup and move stuff where needed
2016-01-30 10:12:38 -05:00
Doug Davis
80c7258e11 Merge pull request #19852 from WeiZhang555/warn-info
Change log level
2016-01-30 09:58:47 -05:00
Vincent Demeester
6b57380173 Merge pull request #19646 from nishanttotla/19277-CustomInfoField
Display SystemStatus field in docker info
2016-01-30 11:48:01 +01:00
Zhang Wei
98f74f8383 Change log level
Warning should be printed with real `logrus.Warn`

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-01-30 18:46:16 +08:00
Nishant Totla
6c5e8dd4c2 Adding SystemStatus field for /info endpoint
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
2016-01-29 16:26:43 -08:00
Kenfe-Mickael Laventure
1ebeb2c9b4 Print an info message when detaching a container started with --rm
Closes #17516

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-01-29 13:19:23 -08:00
Liu Hua
755df347fb forbid login of a null-string username
With this patch, the client blocks this type login, no sending
useless messages to daemon and registry. This saves lots of time.

Signed-off-by: Liu Hua <sdu.liu@huawei.com>
2016-01-29 22:39:22 +08:00
Antonio Murdaca
a7d1aeceec postImagesCreate: move auth config decode when it's needed
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-01-29 14:07:54 +01:00
Antonio Murdaca
505a56d6da api: client: remove redunant function to encode auth
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-01-29 14:07:54 +01:00
Vincent Demeester
6c6729ef5b Merge pull request #19793 from calavera/full_login_prompt
Always prompt for a password when asking for credentials.
2016-01-29 12:39:57 +01:00
Brian Goff
0b7acaf4b9 Merge pull request #19733 from calavera/auth_error_on_post_create
Respond with 401 when there is an unauthorized error from the registry.
2016-01-28 13:44:58 -05:00
David Calavera
8ed06af044 Always prompt for a password when asking for credentials.
There is a weird behavior where we don't ask for a password
when the user you type in the prompt is the same you have configured
in the config file.

This is the source of many frustrations and also a bug.
If the authentication with a registry fails because the password
is incorrect, we won't ask for the password again with the current logic.

With this change, we also stop calling `CmdLogin` directly when
authentication fails. We don't need to parse flags from the cli or
setting up input destriptiors again, like the current behavior is doing.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-01-27 18:26:48 -05:00
David Calavera
7bca932182 Respond with 401 when there is an unauthorized error from the registry.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-01-27 13:55:33 -05:00
Daehyeok Mun
b78c736356 Remove output file when save/export fail
Signed-off-by: Daehyeok Mun <daehyeok@gmail.com>
2016-01-26 22:12:31 -07:00
Arnaud Porterie
fd5013e4fa Merge pull request #19569 from aidanhs/aphs-fix-options-api
Permit OPTIONS request against any url, fixes #19398
2016-01-26 13:39:51 -08:00
Aleksa Sarai
4357ed4a73 *: purge dockerinit from source code
dockerinit has been around for a very long time. It was originally used
as a way for us to do configuration for LXC containers once the
container had started. LXC is no longer supported, and /.dockerinit has
been dead code for quite a while. This removes all code and references
in code to dockerinit.

Signed-off-by: Aleksa Sarai <asarai@suse.com>
2016-01-26 23:47:02 +11:00
Tibor Vass
07e2dedecb Merge pull request #19057 from dnephin/remove_version_from_registry_pkg
Remove dockerversion from registry package
2016-01-25 22:45:06 -08:00
Andy Goldstein
7a948f6a96 Move resize after attaching
Resize by +1 when attaching to force redrawing.

Start monitoring window size after the attach begins instead of before. This way, you see the output
from the container without having to manually resize or hit enter. This makes attach consistent with
run and exec.

Signed-off-by: Andy Goldstein <agoldste@redhat.com>
2016-01-24 02:24:00 -05:00
Aidan Hobson Sayers
ada7920479 Permit OPTIONS request against any url, fixes #19398
Signed-off-by: Aidan Hobson Sayers <aidanhs@cantab.net>
2016-01-23 00:31:08 +00:00
Qiang Huang
603bc69b2c Fix comment about swap limit of docker update
The description "set `-1` to disable swap" is wrong, `build`,
`create` and `run` already fixed, we need to fix `update` as well.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-01-21 13:48:53 +08:00