Red Hat Bugzilla – Bug 1329743
Unable to push images to private registry using docker-1.9.1-25 and python-docker-py-1.7.2-1
Last modified: 2016-05-12 11:18:17 EDT
Description of problem: Installed latest version of docker (1.9.1-25) and python-docker-py (1.7.2-1). When using docker-py's Client::push method to push a local image to remote private registry we get the following error: File "/usr/lib/python2.7/site-packages/docker/api/image.py", line 246, in push self._raise_for_status(response) File "/usr/lib/python2.7/site-packages/docker/client.py", line 146, in _raise_for_status raise errors.APIError(e, response, explanation=explanation) docker.errors.APIError: 400 Client Error: Bad Request ("Bad parameters and missing X-Registry-Auth: EOF") Version-Release number of selected component (if applicable): docker-1.9.1-25 python-docker-py-1.7.2-1 How reproducible: Each time Steps to Reproduce: 1. install docker and python-docker-py 2. start docker 3. pull a test image `docker pull hello-world` 4. tag it for remote private registry `docker tag hello-world:latest <remote_registry>/hello-world` 5. push using docker-py `python -c "from docker.client import Client; Client().push('<remote_registry>/hello-world')" Actual results: Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/lib/python2.7/site-packages/docker/api/image.py", line 246, in push self._raise_for_status(response) File "/usr/lib/python2.7/site-packages/docker/client.py", line 146, in _raise_for_status raise errors.APIError(e, response, explanation=explanation) docker.errors.APIError: 400 Client Error: Bad Request ("Bad parameters and missing X-Registry-Auth: EOF") Expected results: Image should be pushed to remote registry Additional info:
Does it works by downgrading docker itself? (or the other way around downgrading docker-py)
I found the issue, is your private registry setup to require authentication?
will be fixed by https://github.com/projectatomic/docker/pull/134 if we're going to release a new 1.9 in RHEL. From 1.10.3 it's also fixed.
Is this fixed in upstream? I think I was hitting this with 1.11. Originally I thought this is a bug in python-docker-py so I proposed an upstream fix: https://github.com/docker/docker-py/pull/1038
Tomas this was a bug in _out_ projectatomic/docker - upstream doesn't have this bug.
Reproduced it with the latest docker and python-docker-py, if there will be a new build which includes the fix, i'd like to do a quick testing as i keep the environment. # rpm -q docker python-docker-py docker-1.9.1-37.el7.x86_64 python-docker-py-1.7.2-1.el7.noarch Docker-client: # docker push myregistrydomain.com:5000/busybox The push refers to a repository [myregistrydomain.com:5000/busybox] (len: 1) 307ac631f1b5: Image already exists 4b51ded9aed1: Image already exists latest: digest: sha256:72df87de1d513d6e3d8bc8164cce5d2b77c535f7e280b7411f911ebe032949c7 size: 2731 python-docker-py: # `python -c "from docker.client import Client; Client().push('myregistrydomain.com:5000/busybox')"` Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/lib/python2.7/site-packages/docker/api/image.py", line 246, in push self._raise_for_status(response) File "/usr/lib/python2.7/site-packages/docker/client.py", line 146, in _raise_for_status raise errors.APIError(e, response, explanation=explanation) docker.errors.APIError: 400 Client Error: Bad Request ("Bad parameters and missing X-Registry-Auth: EOF")
I'm sure that build has the fix I linked above. I'll ping Lokesh.
(In reply to Antonio Murdaca from comment #9) > I'm sure that build has the fix I linked above. I'll ping Lokesh. Yeah, i checked the docker-1.9.1-38.el7.x86_64, looks like it miss the comment#4 patch
Works for me with docker-1.9.1-39.el7.x86_64 and python-docker-py-1.7.2-1.el7.noarch for details about setup docker-distribution tls , reach for https://bugzilla.redhat.com/show_bug.cgi?id=1330393 comment#3 # `python -c "from docker.client import Client; Client().pull('myregistrydomain.com:5000/busybox')"` # myregistrydomain.com:5000/busybox latest 307ac631f1b5 6 weeks ago 1.113 MB
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHSA-2016-1034.html