Search code examples
dockerdocker-swarm

Docker UCP API prune


In order to remove unused image, use the command

docker image prune [OPTIONS]

In particular, the parameter

--all , -a      Remove all unused images, not just dangling ones

documentation

How can I pass this parameter (--all) via Universal Control Plane API? There aren't support such parameter

documentation введите сюда описание изображения


Solution

  • That is because you're looking at the volume API.

    When you look at the image API, you'll see that there is a dangling parameter which is the equivalent of the --all on the command line.

    enter image description here