docker / hub-feedback

Feedback and bug reports for the Docker Hub
https://hub.docker.com
233 stars 48 forks source link

Hub should update image description/metadata from pushed image labels #2318

Open wiktor-k opened 1 year ago

wiktor-k commented 1 year ago

Problem description

Docker Hub does not update image description when I push an image labelled with org.opencontainers.artifact.description.

I'm managing a number of images and would like to streamline the process of updating metadata that is displayed on Docker Hub. I think automatically reading image labels and updating metadata on Hub side would simplify the process.

Consider the following image: https://hub.docker.com/v2/repositories/wiktork/paperboy

The description is empty even though the image has appropriate label set:

$ docker inspect 00d00ae97582
[
  {
    "Id": "sha256:00d00ae9758250682c525f959af4ea44f426462c235363e612810c40b531b5fc",
...
      "OnBuild": null,
      "Labels": {
        "org.opencontainers.artifact.description": "test-descr" // <-- here
      }
    },
...
]

The same treatment could be applied to other labels (such as org.opencontainers.image.url).

docker info output

Docker Info:

Client:
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  0.10.4
    Path:     /usr/lib/docker/cli-plugins/docker-buildx

Server:
 Containers: 5
  Running: 1
  Paused: 0
  Stopped: 4
 Images: 157
 Server Version: 23.0.1
 Storage Driver: btrfs
  Btrfs: 
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 1fbd70374134b891f97ce19c70b6e50c7b9f4e0d.m
 runc version: 
 init version: de40ad0
 Security Options:
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 6.2.8-arch1-1
 Operating System: Arch Linux
 OSType: linux
 Architecture: x86_64
 CPUs: 64
 Total Memory: 125.7GiB
 Name: radon
 ID: RGPS:ZEPM:XNIO:5JQ2:URPT:32Y7:IYAD:IGRU:TO6W:3A3I:J6Z4:GAJP
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Username: wiktork
 Registry: https://index.docker.io/v1/
 Experimental: true
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

Debug Information

Browser name and version: Firefox 111

URL: https://hub.docker.com/r/wiktork/paperboy

Timestamp or time range: CEST

Hub Username: wiktork

Screenshots of the issue (if applicable)

No description even though image has an appropriate label

(No description even though image has an appropriate label).

Task List

milosgajdos commented 1 year ago

Docker Hub does not update image description when I push an image labelled with org.opencontainers.artifact.description.

Can you please elaborate on what you mean by "update image description"? Do you mean updating the [short] description of the repository that stores the image with the given label?

wiktor-k commented 1 year ago

Do you mean updating the [short] description of the repository that stores the image with the given label?

Yes, that's what I mean. I've marked it as "this description" on the image below so that it's super clear:

2023-04-03-10-48-31

thaJeztah commented 1 year ago

Perhaps this one may be a good fit for our public roadmap (which can help collect more feedback and to prioritise); feel free to open a ticket there with a full description; https://github.com/docker/roadmap/issues

milosgajdos commented 1 year ago

This is also complicated - you can have different images in the same repo each of which can have arbitrary labels. How do imagine this working? Which one wins?

wiktor-k commented 1 year ago

Perhaps this one may be a good fit for our public roadmap (which can help collect more feedback and to prioritise); feel free to open a ticket there with a full description; https://github.com/docker/roadmap/issues

Thanks for the guidance! I wasn't sure where to open the ticket in the first place :)

This is also complicated - you can have different images in the same repo each of which can have arbitrary labels. How do imagine this working? Which one wins?

Indeed this can be solved in many ways. I'll suggest one: last push to latest tag "wins" and overwrites the description.

There's also an alternate, "conservative" solution: update on push only when the repository description(/url) is empty and the label is present in the pushed image. Thus the description would be set only once.