Skip to content

Conversation

@frodopwns
Copy link

This PR allows you to pass docker hub credentials to the watchtower image as ENV vars and thus find images that are private.

@frodopwns
Copy link
Author

Looks like some functions in the tests need to be updated to reflect newly required parameters.

eg. RemoveImage() now requires *AuthConfig or nil

edit: on second thought this may be testing with the wrong version of dockerclient

@frodopwns
Copy link
Author

Also i guess the change to ubuntu is a drastic one. I did this because the watchtower binary would not run in scratch or alpine....possibly due to dynamic linking?

@phumpal
Copy link

phumpal commented Feb 26, 2016

@frodopwns very cool.

I've tested this and it seems to work well with Docker Hub but doesn't seem to support images pulled from a private (self-hosted) repo.

@frodopwns
Copy link
Author

@phumpal yeah it wasn't readily apparent to me in the https://github.com/samalba/dockerclient how you would pull from another registry.

@nafg
Copy link

nafg commented Mar 13, 2016

What's the status of this?

@bahlo
Copy link

bahlo commented Mar 15, 2016

@frodopwns: I checked and I think, you need to set the DockerClient.URL property to change the registry. I've not tested this, but it is used in all registry operations.

I'm not sure though ¯_(ツ)_/¯

Password: password,
Email: email,
}
newContainerID, err = client.api.CreateContainer(config, name, &auth)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe set dockerclient.URL manually to os.Getenv("REPO_REGISTRY"), if not empty, or something?

@frodopwns
Copy link
Author

Looking into using other than Docker Hub repos with credentials...

@chrisferry
Copy link

What's the status of this? Any chance it will support ECR Auth?

@rossvz
Copy link

rossvz commented May 18, 2016

Is there a timeline on this being merged?

@davidgardner11 davidgardner11 merged commit b3d83f9 into containrrr:master May 18, 2016
@curry684
Copy link

The switch to Ubuntu makes this pretty much worthless for any serious use given the amount of disk space it's killing now if you don't use Ubuntu:14.04 in other containers. The point of a watchtower should pretty much be sitting unobtrusively in a very small (5MB) corner of the system methinks.

@frodopwns
Copy link
Author

@curry684 that part probably isn't necessary. I just didn't want to use that previous image in my testing for some reason i can't remember. This is still just a go app so it should run anywhere go binaries do.

@curry684
Copy link

I agree, but it still got merged.

@frodopwns
Copy link
Author

@curry684 #21

@fdattein
Copy link

fdattein commented Sep 5, 2016

@frodopwns funny enough, changes in #21 aren't in master, despite github saying it has been merged. Am I missing something?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants