docker / cli

The Docker CLI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Docker `manifest create --amend` doesn't update the manifest

artiomchi opened this issue · comments

Once a manifest was created, I wasn't able to alter it. I created several images, then created a manifest that could select the correct image based on the current platform. Once deployed to docker hub, I updated the images with a new build and tried to update the manifest file, but realised that the manifest create command wasn't actually changing anything and I was always getting the cached version.

There is NO command to delete the cached manifest :)

What I finally figured out is that I could push it to the docker repository again by calling

docker manifest push --purge artiomchi/helloworld

The --purge parameter cleared the local cached manifest, so I was able to create a new one and push it again overwriting it on the docker hub (I used the purge param again for good measure)

Expected behavior

The --amend attribute in the docker manifest create command should mean that the manifest list should be updated

Actual behavior

If a manifest is cached locally, it won't be updated at all by the docker manifest create --amend command

Information

Running on Windows 10 with 1709 creator's update, Docker 18.03 edge with experimental cli options on (to get access to the manifest commands)

Steps to reproduce the behavior

Based on the https://github.com/artiomchi/HelloWorld project

docker manifest create artiomchi/helloworld:latest artiomchi/helloworld:alpine artiomchi/helloworld:nanoserver artiomchi/helloworld:nanoserver-1709
docker manifest push artiomchi/helloworld:latest

// Create new images

docker manifest create --amend artiomchi/helloworld:latest artiomchi/helloworld:alpine artiomchi/helloworld:nanoserver artiomchi/helloworld:nanoserver-1709

I have the same problem on Mac. It is not just Windows.

Client:
Version: 18.04.0-ce
API version: 1.37
Go version: go1.9.4
Git commit: 3d479c0
Built: Tue Apr 10 18:13:16 2018
OS/Arch: darwin/amd64
Experimental: true
Orchestrator: swarm

Server:
Engine:
Version: 18.04.0-ce
API version: 1.37 (minimum version 1.12)
Go version: go1.9.4
Git commit: 3d479c0
Built: Tue Apr 10 18:23:05 2018
OS/Arch: linux/amd64
Experimental: true

Something I've been wondering: are image indexes (manifest list) and image manifests supposed to be immutable?

Please, please let us delete a manifest, that has been pushed.

@hakan458 Manually delete them in $HOME/.docker/manifests .
But I really wonder why there's create without destroy.

Yeah, it's pretty frustrating that you can't clear or update manifest data from docker manifest. At least this issue exists and suggests how you can clear out the manifest local cache. I was running out of machines I could build the manifest on...

Same issue here...

Hello All,

I too was having this issue, until I found out that the issue is the "--amend" on the manifest create. By removing the --amend on the manifest create, my :latest tag started to be updated with the latest images. (you do have to use the --purge on the manifest push, or else the local manifest cache will not allow a manifest create without the --amend.

You can delete a manifest with: docker manifest rm your_manifest. In this way next time the manifest, if required to be crated with the --amend flag (i.e. to support multi-arch), will be created clean.