Is there a way to connect to multiple private git repos during an automated dockerhub build? We are building golang apps and need to 'go get' other private repos as part of our build and at the moment they fail as docker can't connect to them, only the target private repo.
The main repo is fine as the deploy key is installed via Dockerhub, but any subsequent private repo imports fail.
One way around this I can see, is to build the image locally, "docker push" it to dockerhub and then pull it down on the deploy side which defeats the purpose of dockerhub and the automated build system. The other is to bake ssh keys into the base image which is not a great idea.
Does anyone have a solution to this that doesn't involve baking ssh keys into images or building locally?
Many thanks.