docker / docker/docker-py

docker login dict return missing data if configuration is passed as params without a ~/.docker/config.json config file

Open
#2,184 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
7.2k
Forks
1.7k
Avg merge
13d 8h
Merged PRs (30d)
2

Description

Current status:

Running the docker-py low level API (didn't check the high level API) login commands returns the following JSON when it's given a valid user, pass & host as Parameters (as in code params) without a ~/.docker/config.json file existing will return the following:

{u'IdentityToken': u'', u'Status': u'Login Succeeded'}

Running the same command with a ~/.docker/config.json file will return the following:

{'username': u'myuser', 'password': u'mypass', 'email': None, 'serveraddress': u'https://index.docker.io/v1/'}

Regardless of the return the login seems to work so this bug seems limited to the returned dict.

Expected status:

The dict values returned should be the same regardless of if you passed the login function the user\pass\host as params or had them taken from a file, making them empty in one case and not the other makes it seems like something is wrong with the auth.

I would also like to have some more celerity in the documentation as to what happens if both are passed (is it a combination of the two or does one take priority and the other is ignored? if so which one?)

System stats

docker==3.5.1
docker-pycreds==0.3.0
Python 2.7.15
Client:
Version: 18.09.0
API version: 1.39
Go version: go1.10.4
Git commit: 4d60db4
Built: Wed Nov 7 00:48:47 2018
OS/Arch: linux/amd64
Experimental: false

Server: Docker Engine - Community
Engine:
Version: 18.09.0
API version: 1.39 (minimum version 1.12)
Go version: go1.10.4
Git commit: 4d60db4
Built: Wed Nov 7 00:19:08 2018
OS/Arch: linux/amd64
Experimental: false

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the low-level DaemonApiMixin.login API and compare its returned dict when credentials come from parameters versus ~/.docker/config.json. Verify the behavior on the reported docker 3.5.1 and Python 2.7 setup, then document or test the priority when both sources are supplied and make the returned values consistent.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.