-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
API v2: delete an image #6261
Comments
@baude PTAL |
@Edward5hen i can understand this one is a little confusing because we expose both a single and "batch" removal for images. http://docs.podman.io/en/latest/_static/api.html#operation/libpodRemoveImage is the standard endpoint which removes one image only and the name is in the path of the endpoint. For example, images/foobar ... note there is no remove endpoint, instead the method of DELETE tells the endpoint to remove the image. http://docs.podman.io/en/latest/_static/api.html#operation/libpodImagesRemove is meant for batch removal of images and is a function on "images". So in that case, it is libpod/images/remove and the names of the images to be removed are passed as a query parameter in type array. |
actually, there is a bug ... the single endpoint should NOT have a trailing /remove. Fixing now... |
@Edward5hen thanks for the report! |
the endpoint for single image removal (on the libpod side) should be as follows: versionedPath/libpod/images/IMAGENAME The DELETE method then signifies the removal of the image. Fixes: containers#6261 Signed-off-by: Brent Baude <[email protected]>
@baude it's really my pleasure. The fix is so quick! |
the endpoint for single image removal (on the libpod side) should be as follows: versionedPath/libpod/images/IMAGENAME The DELETE method then signifies the removal of the image. Fixes: containers#6261 Signed-off-by: Brent Baude <[email protected]>
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
As the doc says,
/libpod/images/{name:.*}/remove
should delete an image with DELETE method. But I get a "no such image" 404 code.Steps to reproduce the issue:
setup the apiv2 service
podman pull alpine
curl -v -X DELETE http://localhost:8081/v1.40/libpod/images/f70734b6a266/remove
Describe the results you received:
Describe the results you expected:
Remove the image successfully
Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Output of
podman info --debug
:Additional environment details (AWS, VirtualBox, physical, etc.):
KVM vm
The text was updated successfully, but these errors were encountered: