Skip to content

feat(registry): Allow FROM to refer to the off-cluster docker registry. #101

Merged
bacongobbler merged 1 commit intodeis:masterfrom
Clearbit-boneyard:allow-private-base-image
Sep 30, 2016
Merged

feat(registry): Allow FROM to refer to the off-cluster docker registry. #101
bacongobbler merged 1 commit intodeis:masterfrom
Clearbit-boneyard:allow-private-base-image

Conversation

@robholland
Copy link
Copy Markdown
Contributor

Authenticate to off-cluster registries before building so that the client is able to pull private images specified in the FROM.

Fixes #100

@deis-admin
Copy link
Copy Markdown

Thanks for the contribution! Please ensure your commits follow our style guide. This code will be tested once a Deis maintainer reviews it.

@deis-bot
Copy link
Copy Markdown

@kmala, @mboersma and @ultimateboy are potential reviewers of this pull request based on my analysis of git blame information. Thanks @robholland!

@bacongobbler
Copy link
Copy Markdown
Member

IIRC there was a specific reason @kmala made it so we attach auth credentials when pushing rather than logging into the registry. @kmala, is there a reason for that logic or does this LGTY?

@bacongobbler
Copy link
Copy Markdown
Member

If you wouldn't mind amending your commit such that it follows the commit style guide, that would be awesome! That way it'll get picked up by deisrel when we generate the release changelog. Thanks!

@robholland
Copy link
Copy Markdown
Contributor Author

robholland commented Sep 29, 2016

Yep, I'll reformat, sorry.

If it helps for testing the image is available at quay.io/clearbit/dockerbuilder:canary

@kmala
Copy link
Copy Markdown
Contributor

kmala commented Sep 29, 2016

Jenkins, add to Whitelist

@kmala kmala added this to the v2.7 milestone Sep 29, 2016
@kmala
Copy link
Copy Markdown
Contributor

kmala commented Sep 29, 2016

I was assuming the login() will write the creds to the filesystem but thats not true and docker login does this explicitly https://github.com/docker/docker/blob/e8b9f38c7e2e249084c78c81f136c6d22432af6f/cli/command/registry/login.go#L77.

i had tested this PR by building/pushing an image and also verifying that i can't push the same image from the host on which the build happened.

@bacongobbler
Copy link
Copy Markdown
Member

Attached the "needs rebase" label to note amending the commit first before merging.

Authenticate to off-cluster registries before building so that the client is able to pull private images specified in the FROM.

Note: This only works if the FROM refers to an image on the same registry.
@robholland robholland force-pushed the allow-private-base-image branch from 9643994 to e8763ba Compare September 29, 2016 19:40
@bacongobbler bacongobbler changed the title Allow FROM to refer to a private docker repo. feat(registry): Allow FROM to refer to the off-cluster docker registry. Sep 29, 2016
@bacongobbler bacongobbler self-assigned this Sep 29, 2016
@bacongobbler bacongobbler merged commit 697ae22 into deis:master Sep 30, 2016
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.

5 participants