Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker manifest create --amend doesn't update the manifest #1770

Closed
artiomchi opened this issue Mar 1, 2018 · 8 comments
Closed

Docker manifest create --amend doesn't update the manifest #1770

artiomchi opened this issue Mar 1, 2018 · 8 comments

Comments

@artiomchi
Copy link

artiomchi commented Mar 1, 2018

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
@rn
Copy link
Contributor

rn commented Mar 7, 2018

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.

@begemot57
Copy link

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.

@artiomchi
Copy link
Author

artiomchi commented Mar 20, 2018

@begemot57 um.. did you read my issue? 😄

@artiomchi
Copy link
Author

@rn Thanks for pointing me in the right direction. I'll do that

@staranto
Copy link

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.

@tyrinwu
Copy link

tyrinwu commented Feb 1, 2019

Link for issue in docker/cli docker/cli#954

@hakan458
Copy link

hakan458 commented Apr 4, 2019

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

wi1dcard added a commit to wi1dcard/v2ray-exporter that referenced this issue Jan 9, 2020
@docker-robott
Copy link
Collaborator

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

@docker docker locked and limited conversation to collaborators Jun 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants