spotify / docker-maven-plugin

INACTIVE: A maven plugin for Docker
Apache License 2.0
2.67k stars 575 forks source link

integrate revamped authentication support from docker-client #339

Closed mattnworb closed 7 years ago

mattnworb commented 7 years ago

This largely mirrors changes done in dockerfile-maven to integrate the new authentication support from docker-client.

The plugin now loads credentials from three places, in order:

  1. Any credentials stored in ~/.dockercfg or ~/.docker/config.json

  2. (Optional) Google Cloud credentials, either loaded through the DOCKER_GOOGLE_CREDENTIALS environment variable or Google's automatic resolution process for credentials

  3. Last precedence is given to any explicitly configured credentials in the plugin's configuration.

The useConfigFile parameter is no longer used as authentication info from the docker configuration file is always activated.

One of the big motivations of the revamped authentication support in docker-client was to address long-standing issues in this plugin in regards to being able to authenticate against multiple registries, as the previous implementation assumed that the same credentials would be used for any possible registry.

Closes #326, #284, #252, and probably more.

For more reference see:

mattnworb commented 7 years ago

@davidxia @caipre @mavenraven