Skip to content

Add support for docker hub private registry credentials#845

Merged
rnorth merged 4 commits into
masterfrom
auth-fixes
Sep 9, 2018
Merged

Add support for docker hub private registry credentials#845
rnorth merged 4 commits into
masterfrom
auth-fixes

Conversation

@rnorth

@rnorth rnorth commented Aug 23, 2018

Copy link
Copy Markdown
Member

Closes #819 (I wanted to rebase onto master, so thought it best to start with a fresh branch and PR).

Fixes #820

This comment describes the approach:

This is still WIP, but tackles the two underlying issues that you and others have encountered:

  • basic auth credentials not being parsed out of the config.json file (for all private repos)
  • registry auth for index.docker.io being rejected. To resolve this I've overridden the effectiveAuthConfig method of DockerClientConfig for now, to try and come up with a solution that doesn't require changing docker-java (yet).

In the long term, this requires a fair amount of modification to docker-java to do it cleanly, but for now we can basically layer this on top and refactor later.

@rnorth
rnorth requested review from bsideup and kiview as code owners August 23, 2018 07:27
@rnorth rnorth changed the title WIP: Add support for docker hub private registry credentials Add support for docker hub private registry credentials Aug 25, 2018
@rnorth rnorth changed the title Add support for docker hub private registry credentials Add support for docker hub private registry credentials (closes #820) Aug 25, 2018
@rnorth rnorth changed the title Add support for docker hub private registry credentials (closes #820) Add support for docker hub private registry credentials Aug 25, 2018
…al helpers with private registries and docker hub
@rnorth rnorth added this to the next milestone Aug 26, 2018
Comment thread build.gradle Outdated
Comment thread core/src/main/java/org/testcontainers/utility/LogUtils.java Outdated
Comment thread core/src/test/java/org/testcontainers/utility/AuthenticatedImagePullTest.java Outdated
Comment thread core/src/test/java/org/testcontainers/utility/AuthenticatedImagePullTest.java Outdated
Comment thread core/src/main/java/org/testcontainers/utility/RegistryAuthLocator.java Outdated
@rnorth

rnorth commented Sep 9, 2018

Copy link
Copy Markdown
Member Author

Thanks @bsideup, I’ll merge now.

@rnorth
rnorth merged commit d127fd7 into master Sep 9, 2018
@rnorth
rnorth deleted the auth-fixes branch September 9, 2018 12:08
@rnorth

rnorth commented Sep 10, 2018

Copy link
Copy Markdown
Member Author

We have this out in a Release Candidate build (1.9.0-rc1) for anyone who is keen to try it!

Release notes

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.

Authentication for Docker Hub private registry without credential helpers

2 participants