Repository: containrrr/watchtower

Issue #1050: Docker containers with hash-only image cannot be updated
Created: 2021-08-08T17:19:34Z
Recently, containers without an image tag has been encountered by watchtower users:

#1019
#1026
#1037
#796 (comment)

Since the containers' configurations does not contain the necessary information for updating, watchtower cannot check for updates or recreate them.
Since #1027 (available in watchtower:latest-dev) it should at least no longer crash, but just skip said containers.
One source of these containers seem to be docker compose (with no dash), but it's unclear whether they can be created in some other fashion (you could of course just manually specify the sha256:xxx hash in docker run, but then, what would you expect?)
To verify that containers does not have any named image, you can run docker ps:
$ docker ps
CONTAINER ID   IMAGE             COMMAND                  CREATED          STATUS          PORTS                                       NAMES
fb0c2a735c38   4cdc5dd7eaad      "/docker-entrypoint.…"   18 minutes ago   Up 20 seconds   80/tcp         

In the second column (IMAGE), instead of the image tag, it shows just a short image id hash.
I made a PoC attempting to retrieve the image tag based on the ID, and it is possible to do so under some conditions, but it's highly volatile.
If this is a permanent change in future Docker versions, it may render watchtower unusable... 😩
Add a comment if you know anything more about the source of these containers!

Duplicate issue #1275: Watchtower is unable to update itself. No access to repository.
Created: 2022-04-22T20:48:02Z
Describe the bug

Watchtower is unable to update itself. No access to repository.
To Reproduce

Expected behavior

Screenshots
time="2022-04-21T15:42:04Z" level=warning msg="Reason: registry responded to head request with \"401 Unauthorized\", auth: \"Bearer realm=\\\"https://auth.docker.io/token\\\",service=\\\"registry.docker.io\\\",scope=\\\"repository:library/sha256:pull\\\",error=\\\"insufficient_scope\\\"\"" container=/watchtower_watchtower_1 image="sha256:ac708a0cd96706c6ba4bc0bed52e9113b21dd789322ea69561c85e3d9838abc7"
time="2022-04-21T15:42:05Z" level=info msg="Unable to update container \"/watchtower_watchtower_1\": Error response from daemon: pull access denied for sha256, repository does not exist or may require 'docker login': denied: requested access to the resource is denied. Proceeding to next."

Environment

Client: Docker Engine - Community
 Version:           20.10.14
 API version:       1.41
 Go version:        go1.16.15
 Git commit:        a224086
 Built:             Thu Mar 24 01:47:02 2022
 OS/Arch:           linux/arm64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.14
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.16.15
  Git commit:       87a90dc
  Built:            Thu Mar 24 01:45:51 2022
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          1.5.11
  GitCommit:        3df54a852345ae127d1fa3092b95168e4a88e2f8
 runc:
  Version:          1.0.3
  GitCommit:        v1.0.3-0-gf46b6ba
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0


  Logs from running watchtower with the --debug option 



Additional context

Closing comment (2022-04-29T13:10:19Z): /drone_server_1 is using a pinned version and hence cannot be updated. This is a duplicate of #1050, which contains some solutions for Portainer. They have fixed it in a development version, but I don't think it has been released to stable yet.
As per #1277, the error message will be much clearer, but it still cannot update containers that don't specify what image they are using.