Commit Graph

1656 Commits

Author SHA1 Message Date
6e2fab11f7 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>
Upstream-commit: 243d0d6bbe0376fb43a2718710f31bb068d22168
Component: engine
2016-02-03 13:10:25 -08:00
556e3002c9 Merge pull request #19975 from aaronlehmann/resolve-auth-config
Introduce a client-side version of resolveAuthConfig
Upstream-commit: 7e236e623b234616ca8536a0d2e3f96103aa061b
Component: engine
2016-02-03 15:57:29 -05:00
9ca2cca984 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>
Upstream-commit: ff17cd0bf07fb8fbd811b3a1bf472d701405b1d1
Component: engine
2016-02-03 11:01:29 -08:00
b8fbe028ea Enable cross-platforms logout from Registry
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: 8ee7ad2209502f43496ff65e32fbcd7573b13c26
Component: engine
2016-02-03 10:32:22 -08:00
68f96de053 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>
Upstream-commit: 894266c1bbdfeb53bf278f3cb762945bac69e592
Component: engine
2016-02-03 15:45:20 +08:00
d2d1dc51de Merge pull request #19761 from HackToday/enhancesortattr
Sort the attributes for events
Upstream-commit: 1bc4c99372fa458c70eeb411575a1c538912521d
Component: engine
2016-02-02 16:08:23 -08:00
43913f9547 Merge pull request #19911 from Microsoft/jstarks/npipe
Windows: Add support for named pipe protocol
Upstream-commit: 83ee24e52b04fd8cf1f7366dff04baa43d89ec49
Component: engine
2016-02-02 15:59:45 -08:00
151776465a Merge pull request #19901 from calavera/debug_cli_tests
Always show debug information in the info output
Upstream-commit: 85a32baa3be8a5f2e9dd5262e03726fe9d4d52b3
Component: engine
2016-02-02 15:56:55 -08:00
d7248ffec7 fix error message on version too low
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 0fd9b4067d5126a8059dc2821b835d3bde26e7eb
Component: engine
2016-02-02 14:16:15 -08:00
46e42d4581 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>
Upstream-commit: 9f315dd328a33b51133a41067a508a8b59166a39
Component: engine
2016-02-02 16:57:36 -05:00
27daf9cbce 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>
Upstream-commit: 0906195fbbd6f379c163b80f23e4c5a60bcfc5f0
Component: engine
2016-02-01 19:46:30 -08:00
69d07840eb Merge pull request #19907 from tiborvass/tty-debug
Prevent stdin from hanging
Upstream-commit: ec6bfebc0f36c15793be7e1a581cab0aafcb31c1
Component: engine
2016-02-01 21:57:32 -05:00
32a339fec6 Merge pull request #19896 from calavera/same_rm_error_message
Make error message consistent when removing containers fail.
Upstream-commit: 3c0c115ec89031e0cbd9e739099828342efc872c
Component: engine
2016-02-01 21:19:42 -05:00
2c45eb2fa9 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>
Upstream-commit: 51795c083624b106fe7f338213cbc3d3812f31af
Component: engine
2016-02-01 20:38:01 -05:00
848ab2d223 Merge pull request #19891 from icecrime/windows_login_issue
Enable cross-platforms login to Registry
Upstream-commit: 19eaa71e85f9563e1428347fa9a91c8aa71f1f6d
Component: engine
2016-02-01 19:50:54 -05:00
6da068ab26 Merge pull request #19553 from anusha-ragunathan/rm-daemonbuilder
Remove package daemonbuilder.
Upstream-commit: 680cf1c8f4164d7b3e95759a7cc93ce5843e5543
Component: engine
2016-02-01 13:20:00 -08:00
c20ed2f433 Merge pull request #19416 from mlaventure/warn-on-rm-detach
Print an info message when detaching a container started with --rm
Upstream-commit: 245d6e83a9e739d0d6ab363bfabf779c9b1697f2
Component: engine
2016-02-01 13:17:23 -08:00
fd8165a89d Make error message consistent when removing containers fail.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 50de9fdff11065cbc9783be07ad1b78a35b6bbac
Component: engine
2016-02-01 15:32:50 -05:00
09d7504264 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>
Upstream-commit: 960710bd810e70b7c06b77b956c7bf8cdfeb15f8
Component: engine
2016-02-01 11:18:54 -08:00
fe296e65a0 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>
Upstream-commit: 9c332b164f1aefa2407706adf59d50495d6e02cb
Component: engine
2016-02-01 09:57:38 -08:00
64053aa6b6 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>
Upstream-commit: 746f6af9aa2a48a8910b51ebbfafac511244fd9d
Component: engine
2016-02-01 00:18:33 +00:00
cb234f712d Merge pull request #19638 from runcom/remove-redunant-function
cleanup and move stuff where needed
Upstream-commit: d695cf8de710ca50f5c2b39727f00bfd4be8e07f
Component: engine
2016-01-30 10:12:38 -05:00
b220d6d726 Merge pull request #19852 from WeiZhang555/warn-info
Change log level
Upstream-commit: 80c7258e11c6434658ecb1a7d7e96f0d0390eef3
Component: engine
2016-01-30 09:58:47 -05:00
8c7b621b27 Merge pull request #19646 from nishanttotla/19277-CustomInfoField
Display SystemStatus field in docker info
Upstream-commit: 6b573801730f7655a1e2ef1edc35df8e32b713f7
Component: engine
2016-01-30 11:48:01 +01:00
b810382f68 Change log level
Warning should be printed with real `logrus.Warn`

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 98f74f8383241d2f0a5ed8b17f7016e24af899fa
Component: engine
2016-01-30 18:46:16 +08:00
9aabd7572f Adding SystemStatus field for /info endpoint
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
Upstream-commit: 6c5e8dd4c2351fac8bd76d409f44f42edd4b2f4a
Component: engine
2016-01-29 16:26:43 -08:00
2544e343c9 Print an info message when detaching a container started with --rm
Closes #17516

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 1ebeb2c9b4ef22800845f2d97c277f35672f3ba9
Component: engine
2016-01-29 13:19:23 -08:00
a9daf50532 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>
Upstream-commit: 755df347fbaf6a02e6bdc2d5b7339aade2dbade0
Component: engine
2016-01-29 22:39:22 +08:00
7f6eb0a2ca postImagesCreate: move auth config decode when it's needed
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: a7d1aeceec53cfefd72e5b2161c2c57eae20cf55
Component: engine
2016-01-29 14:07:54 +01:00
4ce68d47a6 api: client: remove redunant function to encode auth
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 505a56d6da69825e2ef1ebcf985a0a2e143d2966
Component: engine
2016-01-29 14:07:54 +01:00
426fb03f9a Merge pull request #19793 from calavera/full_login_prompt
Always prompt for a password when asking for credentials.
Upstream-commit: 6c6729ef5b74a54e20eb2a11812bf5f80e03b174
Component: engine
2016-01-29 12:39:57 +01:00
07e52f456b Merge pull request #19733 from calavera/auth_error_on_post_create
Respond with 401 when there is an unauthorized error from the registry.
Upstream-commit: 0b7acaf4b949ceab3b13d4f91bf7072a1bd76484
Component: engine
2016-01-28 13:44:58 -05:00
98aeb8772a 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>
Upstream-commit: 8ed06af0443f4239f446b3cff202d91a61af350f
Component: engine
2016-01-27 18:26:48 -05:00
860892d919 Respond with 401 when there is an unauthorized error from the registry.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 7bca93218291767c5dd8782de0ad630dbcda9995
Component: engine
2016-01-27 13:55:33 -05:00
868c4d3b26 Remove output file when save/export fail
Signed-off-by: Daehyeok Mun <daehyeok@gmail.com>
Upstream-commit: b78c736356cb2142e66bd8c8020f6f355c565917
Component: engine
2016-01-26 22:12:31 -07:00
282971bd64 Merge pull request #19569 from aidanhs/aphs-fix-options-api
Permit OPTIONS request against any url, fixes #19398
Upstream-commit: fd5013e4fa18e895abd33da714189dbeb0cbf576
Component: engine
2016-01-26 13:39:51 -08:00
4edafc3bc1 *: 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>
Upstream-commit: 4357ed4a7363a1032edf93cf03232953c805184f
Component: engine
2016-01-26 23:47:02 +11:00
25849c48bc Merge pull request #19057 from dnephin/remove_version_from_registry_pkg
Remove dockerversion from registry package
Upstream-commit: 07e2dedecb3a0b7381ebf0f8fb4d08d082754cd0
Component: engine
2016-01-25 22:45:06 -08:00
1b0241a8aa Permit OPTIONS request against any url, fixes #19398
Signed-off-by: Aidan Hobson Sayers <aidanhs@cantab.net>
Upstream-commit: ada792047907907fb94c332faf3ad7e1b125e98d
Component: engine
2016-01-23 00:31:08 +00:00
ff3e96b827 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>
Upstream-commit: 603bc69b2c3c00714c18e6ddc65bf53c2f1a079d
Component: engine
2016-01-21 13:48:53 +08:00
31eb5171fa Move tty set and restore to caller
Fixes #19506

This fixes the issue of errors on create and the tty not being able to
be restored to its previous state because of a race where it was
in the hijack goroutine.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: a1eb6029cc4e4ccd820b0aac147a6121f1967ba2
Component: engine
2016-01-20 13:32:19 -08:00
d9d4f4eb39 Remove obsolete comment
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 3dc8829a83d72d3a8e1d9b6a88c9e6ff9ecaf4a0
Component: engine
2016-01-19 12:17:40 -08:00
dca237fb71 api: client: build: do not fall through if git isn't installed
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 167cc42986c8939c7aacf73570adaf19b8cad0b3
Component: engine
2016-01-19 16:50:14 +01:00
5779f0bfc3 Merge pull request #19420 from clnperez/close-notify-fix
Move closeNotify to fix panic with newer golang
Upstream-commit: b6be6451971afc7798c1aa22ff73d681c4e0019b
Component: engine
2016-01-18 20:08:25 -05:00
88549196d4 Merge pull request #19414 from anusha-ragunathan/postBuild
Make daemonbuilder.Docker leaner.
Upstream-commit: a495c148a5948c372c626c6a4643d361f31374d0
Component: engine
2016-01-18 21:46:49 +01:00
1fa4309fd5 Move closeNotify to fix panic with newer golang
This is happening now due to improvements in net/http:
99fb19194c

To test, change the go version in the Dockerfile:
-ENV GO_VERSION 1.5.3
+ENV GO_VERSION 1.6beta2

More info here: https://github.com/golang/go/issues/14001

Signed-off-by: Christy Perez <christy@linux.vnet.ibm.com>
Upstream-commit: 2df5dafdaf12296fa2bd92ced62ba80da41af744
Component: engine
2016-01-18 14:24:25 -06:00
bd1120dfd8 Make daemonbuilder.Docker leaner.
Currently builder.Backend is implemented by daemonbuilder.Docker{} for
the daemon. This registration happens in the API/server code. However,
this is too implementation specific. Ideally we should be able to specify
that docker daemon (or any other) is implementing the Backend and abstract
the implementation details. So we should remove package daemonbuilder
dependency in build_routes.go

With this change, daemonbuilder.Docker is nothing more than the daemon.
A follow on change will remove the daemonbuilder package and move relevant
methods under daemon, so that API only knows about the backend.

Also cleanup code in api/client/build.go. docker cli always performs build
context tar download for remoteURLs and sends an empty remoteContext. So
remove relevant dead code.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: 14215ed5a1900a88a3b17dd7cd566def50bfcbc9
Component: engine
2016-01-18 09:16:11 -08:00
a208c4a74e Remove the use of dockerversion from the registry package
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 61a49bb6ba2c0f17a31a64ee6336b4fc40c37f71
Component: engine
2016-01-15 12:43:54 -05:00
cd32dc3773 Bump API Version to v1.23
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: a0fab35fe80f201fc40477a32a992f6cd931cf44
Component: engine
2016-01-15 10:44:02 -05:00
6e02d0f3a0 Merge pull request #19355 from riyazdf/notary-revendor
notary revendor into docker
Upstream-commit: 4c89b1f72c1259858e243ddbfb00d74dbafeff8a
Component: engine
2016-01-15 01:02:35 -08:00