mirror of
https://github.com/containrrr/watchtower.git
synced 2025-12-14 14:10:12 +01:00
Cannot load host Docker config from container. Remove option and rely on environment variables
This commit is contained in:
parent
1c59200565
commit
541264281c
3 changed files with 2 additions and 5 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue