watchtower: Non-standard image refs does not map to expected repositories in config.json
Describe the bug
I am unable to pull private repositories with mapped config.json
Unable to update container "/grafana_importer": Error response from daemon: pull access denied for dockergelb/grafana-importer, repository does not exist or may require 'docker login
To Reproduce
I have mapped the config.json in /root/.docker, to /config in the watchtower container, but it is still failing to pull private repositories, even though the same repos are accessible on the host system.
This is the docker-compose file I use, (.env just contains the notification variables):
version: "3.3"
services:
watchtower:
image: containrrr/watchtower
container_name: watchtower
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /root/.docker/config.json:/config.json
env_file: .env
Environment
- Platform: Linux/Debian
- Docker version: 20.10.2
- Watchtower version: latest
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 24 (16 by maintainers)
Hey @simskij, just to clarity as I’m facing the same issue. This should work:
docker login):{ "auths": { "https://index.docker.io/v1/": { "auth": "***********" } } }${HOME}/.docker/config.json:/config.jsondocker.io/lsaadeh1/test:latestIt works when I manually copy my auth token for
index.docker.iointo a new entry for my username