Commit Graph

95 Commits

Author SHA1 Message Date
2919d69a0c Remove email address field from login
This removes the email prompt when you use docker login, and also removes the ability to register via the docker cli. Docker login, will strictly be used for logging into a registry server.

Signed-off-by: Ken Cochrane <kencochrane@gmail.com>
Upstream-commit: aee260d4eb3aa0fc86ee5038010b7bbc24512ae5
Component: engine
2016-02-29 17:53:27 -08:00
8a7585ce8e Client credentials store.
This change implements communication with an external credentials store,
ala git-credential-helper. The client falls back the plain text store,
what we're currently using, if there is no remote store configured.

It shells out to helper program when a credential store is
configured. Those programs can be implemented with any language as long as they
follow the convention to pass arguments and information.

There is an implementation for the OS X keychain in https://github.com/calavera/docker-credential-helpers.
That package also provides basic structure to create other helpers.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: cf721c23e715e545eccf8484e145c2d18d6a6a23
Component: engine
2016-02-29 13:01:31 -05:00
0a01ad0c9c Merge pull request #19835 from ncdc/resize-after-attach
Move resize after attaching
Upstream-commit: c2ebdb3e573cbbb053eb4644119f3c99a6111bdc
Component: engine
2016-02-10 15:32:51 +01: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
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
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
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
7829f8b05d 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>
Upstream-commit: 7a948f6a969137c2f8f0b47e75b30cc28ac0a37c
Component: engine
2016-01-24 02:24:00 -05:00
4ec2693c9e Modify import paths to point to the new engine-api package.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 907407d0b2e5863f0e1b40b93a356bbf03c7b9fb
Component: engine
2016-01-06 19:48:59 -05:00
7f5dff04d0 Move IndexInfo and ServiceConfig types to api/types/registry/registry.go
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
Upstream-commit: 96c10098ac32f700f37358e2adc36c94741772bb
Component: engine
2015-12-14 11:28:02 -05:00
0d867da41c Move AuthConfig to api/types
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
Upstream-commit: 5b321e328769cc93c3454e82ec3fe07672156f2e
Component: engine
2015-12-14 11:22:01 -05:00
5ff0f9ef5e Refactor ResolveAuthConfig to remove the builder dependency on cli code.
registry.ResolveAuthConfig() only needs the AuthConfigs from the ConfigFile, so
this change passed just the AuthConfigs.

Signed-off-by: Daniel Nephin <dnephin@gmail.com>
Upstream-commit: 920ea13516c24d00931cac42b608b5827986ede7
Component: engine
2015-12-11 19:31:24 -08:00
7e3377f7d7 Use correct fn for resizing TTY
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 3260ddb10bff8d1b5cabe547ecb77e19d379a3c6
Component: engine
2015-12-09 22:55:01 -05:00
1c8ead7dbd Remove old http from the docker cli.
Everything has been ported to the client library 🎉

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 5a0a6ee9cd55f3e2f57d992a032421d0e126040d
Component: engine
2015-12-09 12:05:00 -05:00
20cb7dcbfb Implement docker resize with standalone client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: d1057e4c4672b584590295f3d9b96a90183bbfcd
Component: engine
2015-12-09 12:05:00 -05:00
af8924d4fb Implement docker pull with standalone client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: e78f02c4dbc3cada909c114fef6b6643969ab912
Component: engine
2015-12-09 12:05:00 -05:00
bacc70658e Implement docker exec with standalone client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 3f9f23114f7cccd9e9972d457f0f1d2502eaa4af
Component: engine
2015-12-09 12:04:59 -05:00
bf3d33ff62 Implement getExitCode with standalone client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 7df71ca31dad5eb48093879730b4761b2109291e
Component: engine
2015-12-09 12:04:58 -05:00
8917bc241d Implement docker wait with standalone client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 51efb1480a58b2317e1ad1833964ccad4456e6be
Component: engine
2015-12-09 12:04:58 -05:00
48001c30bb dockerversion placeholder for library import
- Add a *version* file placeholder.
- Update autogen and builds to use it and an autogen build flag

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 8054a303870b81eebe05e38261c1b68197b68558
Component: engine
2015-11-09 19:32:46 +01:00
cc55863497 Revert "dockerversion placeholder for library-import"
This reverts commit d5cd032a86617249eadd7142227c5355ba9164b4.

Commit caused issues on systems with case-insensitive filesystems.
Revert for now

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: b78ca243d9fc25d81c1b50008ee69f3e71e940f6
Component: engine
2015-10-27 21:23:53 -04:00
4d261096ec dockerversion placeholder for library-import
- Move autogen/dockerversion to version
- Update autogen and "builds" to use this package and a build flag

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: d5cd032a86617249eadd7142227c5355ba9164b4
Component: engine
2015-10-27 20:36:07 +01:00
f91e0804c7 Make RegistryConfig a typed value in the api.
Remove possible circular dependency that prevented us from using a real
type.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 719886d4352cba3f2cd0092e052bb4cb67d51417
Component: engine
2015-09-07 19:29:33 -04:00
b0a38c37db Merge pull request #15370 from cpuguy83/better_error_on_client_connect
Better/more specific error messages on connect
Upstream-commit: 0262d40ba7d2edc67077a17aebbcdca1e2472a1e
Component: engine
2015-08-07 13:00:44 -07:00
13560065bd Better/more specific error messages on connect
Closes #15309

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 9994a35b5d4af281304b5146f88a225b9237712e
Component: engine
2015-08-06 16:41:37 -04:00
8abf310a09 Cleanup: factor anonymous function out of cli.clientRequestAttemptLogin
Signed-off-by: Victor Palma <palma.victor@gmail.com>
Upstream-commit: d821426fa0fb1c64e63a0421415534cfed09365a
Component: engine
2015-07-21 16:28:41 -05:00
66d10b96a0 golint for cliconfig
- fully capitalize HTTP in HTTPHeaders
 - comment for CONFIGFILE
 - camelcase and privatize oldConfigfile, defaultIndexserver
 - remove unused var errConfigFileMissing
 - comments for methods and functions throughout
 - external references to renamed variables changed

Signed-off-by: Morgan Bauer <mbauer@us.ibm.com>
Upstream-commit: dea49b7474f0efcefe4618b6133330f0bb5e2c84
Component: engine
2015-07-20 16:48:58 -07:00
22fa301a78 add support for base path in docker cli -H
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
Upstream-commit: 47a7f770f42bc0fd9b0a594b72a8f20fb4b874d1
Component: engine
2015-07-08 15:42:40 -07:00
0602984ad2 Merge pull request #14518 from Microsoft/10662-infowarnings
Windows: Remove meaningless warnings on docker info
Upstream-commit: 41858096592cdb13893ce9e618997856d615b016
Component: engine
2015-07-13 14:30:57 -07:00
6b5ea18f12 Merge pull request #13986 from tg123/master
prompt a cli login if receive 401 from registry v2 auth server
Upstream-commit: ff8cef332663584504c24a1e4968069b1fcdc29c
Component: engine
2015-07-10 15:33:42 -07:00
c8344b3dc3 Windows: Remove meaningless warnings on docker info
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 615681f5177cef974d516d5814195c768e773dd2
Component: engine
2015-07-10 10:06:20 -07:00
a462e56268 api/client: close the returned io.ReadCloser
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
Upstream-commit: 91a496055c3e45ab3fba8e643475adb618581e1f
Component: engine
2015-07-08 10:06:25 +08:00
2107a3b6a8 Add better client error for client certificate failure (missing or denied)
This adds a more meaningful error on the client side so the "bad
certificate" error coming from the TLS dial code has some context for
the user.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: d175ef6773708afef5982d233ad600f18cf2cdc2
Component: engine
2015-06-26 16:23:05 -07:00
1e47c22f14 Windows: Security warning based on server OS
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 126529c6d0a20675de8f50939c57f23259d3e763
Component: engine
2015-06-26 10:33:45 -07:00
d924a293ae Update utils.go
make error message when running commands while daemon is down more user-friendly.

```
docker@54.175.201.239 ~: sudo service docker stop
docker stop/waiting
docker@54.175.201.239 ~: docker images
Get http:///var/run/docker.sock/v1.19/images/json: dial unix /var/run/docker.sock: no such file or directory. Are you trying to connect to a TLS-enabled daemon without TLS?
```

Signed-off-by: Damien Nozay <damien.nozay@gmail.com>
Upstream-commit: e9ac7d24a7de5e009f74887cf21f15b6bb4e4605
Component: engine
2015-06-25 10:15:52 -07:00
f3684edb38 Error out if client API version is too old
Signed-off-by: Antonio Murdaca <runcom@linux.com>
Upstream-commit: 910322a8935a45b6b69255edd3e06c8fef97feda
Component: engine
2015-06-18 11:03:07 +02:00
b1c6279d52 prompt a cli login if receive 401 from registry v2 auth server
Signed-off-by: tgic <farmer1992@gmail.com>
Upstream-commit: fe7b3658bd828bc034037d9ae813b4addf7dfdc3
Component: engine
2015-06-17 19:28:13 +08:00
cd985d0b5e Merge pull request #13860 from jlhawn/cli_call_headers
api/client: have cli.call() return headers
Upstream-commit: cd36b15ccb8561de95ee2e018baa778316da4423
Component: engine
2015-06-13 09:14:40 -07:00
1a52506c99 Merge pull request #13749 from Microsoft/adduseragent
Add GOOS in User-Agent
Upstream-commit: 422fa7f0a6c27e73125dd1f25de02198033e313e
Component: engine
2015-06-12 17:19:51 -07:00
1f7c141bcf api/client: have cli.call() return headers
Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: 0cdc3b7539b618778becf233157604698b4e8281
Component: engine
2015-06-10 16:20:13 -07:00
c49e649bfd Typo fix in api\client\utils.go
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 84aec1e8e6e6b3e7ea2da31fcae5a80df026edc6
Component: engine
2015-06-10 15:24:53 -07:00
475fb0945f Add GOOS in User-Agent
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 543cf79ffba276fe90ff9eb3a85adb4a53e31366
Component: engine
2015-06-04 13:37:41 -07:00
cad4e1508b Provide a struct to configure cli streaming
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: d9639409fd54ee6955793474fa9a5bac1e583c77
Component: engine
2015-05-01 20:23:44 +02:00
016ac4bf61 Remove engine mechanism
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: 531f4122bdcd4de289f613a5ef010f4c1989f098
Component: engine
2015-04-30 01:35:16 +02:00
c8f1332dce Move CLI config processing out from under registry dir
No logic changes should be in here, just moving things around.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: bb9da6ba9294a8eab8f4dfaf7cf07c57959fe608
Component: engine
2015-04-23 10:18:38 -07:00
fdf9a8d629 Remove job from container_inspect
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: 4b9fe9c298c8778855c1d14e978c791496dd7c42
Component: engine
2015-04-23 00:58:13 +02:00
ed4e61e70a Fix golint errors in docker/api/client
Signed-off-by: Peggy Li <peggyli.224@gmail.com>
Upstream-commit: 58065d0dd9adec4b2f397a453652cc8cc7237a17
Component: engine
2015-04-22 00:14:23 -07:00
44c88b9112 Add .docker/config.json and support for HTTP Headers
This PR does the following:
- migrated ~/.dockerfg to ~/.docker/config.json. The data is migrated
  but the old file remains in case its needed
- moves the auth json in that fie into an "auth" property so we can add new
  top-level properties w/o messing with the auth stuff
- adds support for an HttpHeaders property in ~/.docker/config.json
  which adds these http headers to all msgs from the cli

In a follow-on PR I'll move the config file process out from under
"registry" since it not specific to that any more. I didn't do it here
because I wanted the diff to be smaller so people can make sure I didn't
break/miss any auth code during my edits.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 18c9b6c6455f116ae59cde8544413b3d7d294a5e
Component: engine
2015-04-20 13:05:24 -07:00