Skip to content

Docker containers with hash-only image cannot be updated #1050

Closed
@piksel

Description

@piksel

Recently, containers without an image tag has been encountered by watchtower users:

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!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions