Skip to content

Use manifest-tool/docker manifest to "retag" manifests for staging? #31

@StefanScherer

Description

@StefanScherer

In our pipeline we use different tags for stages like unstable, testing, stable, ...
At the moment to retag an image we have to pull it completely, tag it and push the tag (which will be cached as no layer has differences). This is done on a separate machine that normally has no images pulled, so we don't want that pull as it takes time.
And thinking of multiarch/multios images for Windows and Linux this wouldn't be possible on a Linux machine as it can't pull and push Windows images.

So I tried the manifest-tool yesterday (with only linux/amd64 right now, so only one platform) to use it to remote "tag" an image. For the first step using real images as input it works, but for the next stage it only shows an error

$ manifest-tool push from-args --platforms linux/amd64 --template "org/app:testing" --target "org/app:production"
INFO[0000] Retrieving digests of images...              
FATA[0003] You specified a manifest list entry from a digest that points to a current manifest list. Manifest lists do not allow recursion. 

I then tried the "docker manifest" pull request, and it worked for that step as well. But soon I found out that it probably only worked because the manifest list only has one platform listed. I tried it with a multiarch image and the "docker manifest" command also comes up with the same error.

My workflow in mind would look like this:

docker_manifest

Any ideas how to support that with manifest-tool or "docker manifest" command?
Especially moving/retagging multiarch images would be interesting without pulling all images.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions