Docker `manifest create --amend` doesn't update the manifest
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
Thanks. This does not seem to be specific to Docker for Windows. Could you please file an issue under https://github.com/docker/cli/ there docker manifest is implemented. Thanks.
One way around could be this: ./build/docker manifest push --purge your-image:tag "--purge" removes the local manifest list after push. making "docker manifest create ..." work with no "--amend" provided. So repush your images with --purge, recreate new once and repush again.
@begemot57 um.. did you read my issue? 😄
@rn Thanks for pointing me in the right direction. I'll do that
As mentioned here https://github.com/appscodelabs/discuss/issues/57#issuecomment-402245615, the best practice is to use some type of sensible versioning scheme in your tags.
Another workaround appears to be to simply delete the directory structure in ~/.docker/manifests/ that references the manifest you're trying to update. The docker manifest create ... works fine after that.
Docker for Mac and for Linux - both 18.06.0-ce, Git commit 0ffa825.
Link for issue in docker/cli https://github.com/docker/cli/issues/954
Is there any way to delete a manifest from the registry after you've pushed? I see there is some option using the V2 registry API, but ours is V1 :) https://docs.docker.com/registry/spec/api/#manifest
Closed issues are locked after 30 days of inactivity. This helps our team focus on active issues.
If you have found a problem that seems similar to this, please open a new issue.
Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle locked