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

pull/26/head
Ross Cadogan 8 years ago
parent 1c59200565
commit 541264281c

@ -39,7 +39,7 @@ docker run -d \
centurylink/watchtower
```
If pulling images from a private Docker registry, supply any authentication credentials with the environment variables `REPO_USER` and `REPO_PASS` or omit to leave watchtower load credentials from the default Docker config (`~/.docker/config.json`):
If pulling images from a private Docker registry, supply any authentication credentials with the environment variables `REPO_USER` and `REPO_PASS`.
```
docker run -d \

@ -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{}

@ -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)

Loading…
Cancel
Save