Skip to content

AzDO Docker Task unable to add Base Image digest label #408

@anumalasri

Description

@anumalasri

AzDO Docker tasks were unable to add base image digest, as task is looking for "RepoDigests" instead of 'Digest'.

https://github.com/microsoft/azure-pipelines-tasks-common-packages/blob/1a85babc3fcdfe52f2615247f0d088719d98037e/common-npm-packages/docker-common/containerimageutils.ts#L147C48-L147C59

Verified image available in docker hub and most of images have multiple RepoDigests. For example:

  "Id": "1b08278b118b0c1724bbdb78ad3ca04cea8c2675586b8ae3fb1f9088b69ec00d",
  "Digest": "sha256:a892d3aff561b7f1f49573d1536dda944c9c3133ad47ff76f95db7d529ed26a6",
  "RepoTags": [
       "docker.io/istio/proxyv2:1.24.0"
  ],
  "RepoDigests": [
       "docker.io/istio/proxyv2@sha256:a892d3aff561b7f1f49573d1536dda944c9c3133ad47ff76f95db7d529ed26a6",
       "docker.io/istio/proxyv2@sha256:ee6565e57319e01b5e45b929335eb9dc3d4b30d531b4652467e6939ae81b41f7"
  ],

Due to above reason, the task is skipping to add image.base.digest labe, but giving this message.

##[debug]Multiple digests were found for image:

Is it possible to find appropriate base image Digest or default it to first one ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions