Used to remove stuck network attachment tasks from swarm, when everything else has failed. When docker network rm fails, note the task id that it says is still using the network. Then, run
docker run -v /var/run/docker/swarm/control.sock:/var/run/swarmd.sock dperny/tasknuke <taskid>
This docker image contains the swarmctl binary, with the entrypoint set to swarmctl task rm. All you need to do is mount the swarm control socket /var/run/docker/swarm/control.sock into the container at /var/run/swarmd.sock and provide the task id.
Make really sure that there are no attachable containers currently connected to the network, because I have no idea what will happen if you remove a network attachment task that's still in use.
Content type
Image
Digest
Size
6.8 MB
Last updated
almost 9 years ago
docker pull dperny/tasknuke