服务中存在相同的解决方案:
docker service rm $(docker service ls -q)
You can just remore the stack
docker stack rm nameofstack
With this, all services will be removed.
To clean all volumes, containers, images and networks you can use:
docker system prune -a -f
This is a one way to do it. docker service rm $(docker service ls --format "{{.ID}}")
找到方法:
docker service ls | grep -v '^ID' | awk '{print $1}' | xargs docker service rm
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.