New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Cube-Docker] Add support for building images that reference an image from a private registry #768

Closed
georgwolf opened this Issue Jul 27, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@georgwolf
Contributor

georgwolf commented Jul 27, 2017

Issue Overview

Building Docker images based on an image from a private registry fails with
com.github.dockerjava.api.exception.DockerClientException: Could not build image: Get https://[...]/manifests/latest: no basic auth credentials

Expected Behaviour

Registry settings from arquillian.xml docker extension are used for build too.

Steps To Reproduce
  1. Build an image with a FROM that references an image from a private repository that hasn't been pulled yet
@lordofthejars

This comment has been minimized.

Show comment
Hide comment
@lordofthejars

lordofthejars Jul 27, 2017

Member

Have you tried to configure all credential things in arquillian.xml, in theory same mechanism should be used

Member

lordofthejars commented Jul 27, 2017

Have you tried to configure all credential things in arquillian.xml, in theory same mechanism should be used

@georgwolf

This comment has been minimized.

Show comment
Hide comment
@georgwolf

georgwolf Jul 27, 2017

Contributor

Yes, pulling that same image works but building from it does not.
I checked with the debugger and the java-docker lib does use the registry settings from the DockerClientConfig for pulling and pushing images by default but it doesn't use them for building.
This requires explicitly setting them via BuildImageCmd#withBuildAuthConfigs.

I'll create a PR for this.

Contributor

georgwolf commented Jul 27, 2017

Yes, pulling that same image works but building from it does not.
I checked with the debugger and the java-docker lib does use the registry settings from the DockerClientConfig for pulling and pushing images by default but it doesn't use them for building.
This requires explicitly setting them via BuildImageCmd#withBuildAuthConfigs.

I'll create a PR for this.

@lordofthejars

This comment has been minimized.

Show comment
Hide comment
@lordofthejars

lordofthejars Jul 27, 2017

Member

Great!!! Thank you very much for your investigations.

Member

lordofthejars commented Jul 27, 2017

Great!!! Thank you very much for your investigations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment