Closed grimesjm closed 8 years ago
Running captain build while setting CIRCLECI to true works correctly since it seems to be shelling out to docker directly(I'm not very familiar with GO).
Seems like it's either a go-dockerclient issue or a problem with how captain invokes it.
Ok so here's what I've found. Based on this test: https://github.com/fsouza/go-dockerclient/blob/master/build_test.go#L116-L125 You can pass AuthConfigurations into the docker client. It doesn't seem by default it uses the .dockercfg on its own.
There is a separate function here: https://github.com/fsouza/go-dockerclient/blob/master/auth.go#L50 that allows you to fetch the AuthConfigurations for .dockercfg.
So if we change this:
https://github.com/harbur/captain/blob/master/docker.go#L33-L41
To also invoke the function to return the dockercfg settings I think it would work.
yes, with CIRCLECI it shells out to docker (they have their custom docker binary).
I was expecting it to be transparent from the go-dockerclient library user point of view.
It shouldn't be difficult to add it here.
CAPTAIN] Building image indigobio/rules:latest Step 0 : FROM indigobio/deps:latest Pulling repository docker.io/indigobio/deps Error: image indigobio/deps:latest not found
docker build -t indigobio/rules . Sending build context to Docker daemon 8.008 MB Step 0 : FROM indigobio/deps:latest latest: Pulling from indigobio/deps
2fad5d366fbd: Already exists
If the image is already pulled then captain build will work fine. I can also push my private images through captain push no problem. Any thoughts?