Skip to content
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

docker-compose - Using private images #346

Closed
rgarbin opened this issue May 26, 2017 · 5 comments
Closed

docker-compose - Using private images #346

rgarbin opened this issue May 26, 2017 · 5 comments

Comments

@rgarbin
Copy link

rgarbin commented May 26, 2017

Hi,

How I could up my compose.yml using private images?

I take a look and not found this option to notify testcontainers when up and run docker/compose

In my host I do docker login and trying my docker-compose from host, run ok, only by testcontainer the compose not work with private images.

@ClassRule
public static DockerComposeContainer compose = new DockerComposeContainer(new File("src/test/resources/docker-compose-test.yml"));
@rgarbin
Copy link
Author

rgarbin commented May 26, 2017

Testcontainers use as docker client the docker-java lib, so, I only need a property file to set my credentials, right?

https://github.com/docker-java/docker-java

$ cd ~
$ vim .docker-java.properties
registry.username=myuser
registry.password=mypass
registry.email=mymail@gmail.com

A created a simple project only with docker-java and my tests to pull private images work. My client read my config(.docker-java.properties) and connected in docker hub.

@KORPSE
Copy link

KORPSE commented Jul 4, 2017

Looks like it is connected with bug in Docker docker/compose#4171
It was fixed in version 1.10, so I suggest to upgrade the version of docker-compose container here
Is it possible?

@rgarbin As a workaround you could use DockerComposeContainer.withLocalCompose(true) to prevent starting docker-compose in a container.

@kiview
Copy link
Member

kiview commented Jul 6, 2017

I don't think the issue is related, we could update the docker-compose image nevertheless though.
DockerComposeContainer.withLocalCompose(true) is a good workaround, what about mounting the .docker/config.json into the compose container? Should work as well.

@iNikem
Copy link
Contributor

iNikem commented Jan 30, 2018

Isn't it fixed by #536 and can be closed now?

@kiview
Copy link
Member

kiview commented Jan 30, 2018

@iNikem is right, I'll close this issue.
Fixed by #537

@kiview kiview closed this as completed Jan 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants