Skip to content

Conversation

shin-
Copy link
Contributor

@shin- shin- commented Jul 20, 2015

Follow-up to #677

moutten and others added 3 commits July 17, 2015 15:48
In order to support the docker API for version 1.7+, this command
changes the way the `X-Registry-Config` header is sent when attempting
to build an image.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only issue that this causes, for my particular situation, is that docker-compose would still be broke since it registers the client API version as 1.18. I don't know really how to detect what version the docker server is expecting. I'm not sure that an API version was changed when this authentication header was changed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ping @aanand :3

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the change went out in Docker 1.7.1, according to the milestone on this PR: moby/moby#14139

I don't see any switching being done on the API version, so it's possible that backwards compatibility is broken. I've asked for clarification: moby/moby#14139 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From Josh's answer, seems like the change only affects 1.7.0 and was reverted in 1.7.1 - making this PR unnecessary. Users of 1.7.0 should upgrade to 1.7.1.

@moutten Can you confirm that this change is unnecessary with Docker 1.7.1 ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change was still necessary with 1.7.1. You'll see that the previous code was including a top level key of configs. Removing the top level key of configs works with 1.7.1. Based on Josh's comment, I'm not sure that was previously necessary. I haven't tried testing to see if removing the configs still works against older versions of docker (prior to 1.7).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested my setup using docker version 1.6.2, docker-compose 1.3.3, along with a patched version of docker-py, and I can verify it did work correctly with the change in this pull request. This looks like the cleanest way for docker-py to implement this change. It looks like I'm going to have to wait for docker-compose to change the supported API to 1.19.

@moutten
Copy link
Contributor

moutten commented Jul 20, 2015

By the way, thanks @shin-, your solution is much better.

shin- added a commit that referenced this pull request Jul 22, 2015
Switch to send full AuthConfig object for build action
@shin- shin- merged commit f8ad2da into master Jul 22, 2015
@shin-
Copy link
Contributor Author

shin- commented Jul 22, 2015

Thanks for following up so closely @moutten !

@shin- shin- deleted the moutten-fix-build-auth branch August 4, 2015 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants