Cannot load host Docker config from container. Remove option and rely on environment variables

This commit is contained in:
Ross Cadogan 2016-10-18 14:51:44 +01:00
parent 1c59200565
commit 541264281c
3 changed files with 2 additions and 5 deletions

View file

@ -148,10 +148,6 @@ func (client dockerClient) IsContainerStale(c Container) (bool, error) {
var opts types.ImagePullOptions // ImagePullOptions can take a RegistryAuth arg to authenticate against a private registry
auth, err := EncodedEnvAuth(imageName)
if err != nil {
// credentials environment vars not set, trying Docker config instead
auth, err = EncodedConfigAuth(imageName)
}
if err != nil {
log.Debug("No authentication credentials found")
opts = types.ImagePullOptions{}

View file

@ -48,6 +48,7 @@ func EncodedEnvAuth(ref string) (string, error) {
/*
* Return an encoded auth config for the given registry
* loaded from the docker config
* The docker config must be mounted on the container
*/
func EncodedConfigAuth(ref string) (string, error) {
server, err := ParseServerAddress(ref)