docker / docker/cli

How about prune all resources with `docker stack deploy --prune`

Open
#203 5 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/stack kind/enhancement
Dominant language
Go
Stars
6.1k
Forks
2.2k
Avg merge
1d 15h
Merged PRs (30d)
43

Description

Prune currently removes services that are no longer referenced.

--prune                  Prune services that are no longer referenced

It might be nice to have similar functionality for other resources especially config files and secrets because changing either of these requires a new config file or secret which wouldn't be so bad if the old, unused ones were easily cleaned up. Maybe this could apply to networks and volumes too? Maybe we need a flag to opt in to what is pruned?

This would only apply to resources created by the stack, not externally created and not externally used resources. Also, this wouldn't apply to resources needed during a rolling update, for example the last version of a config file that's still in use, though that could be removed if the update completes successfully.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the docker stack deploy --prune behavior described in the issue and compare how stack-created config files, secrets, networks, and volumes are tracked. Define the resource-pruning scope and opt-in behavior, including rolling-update and external-resource cases, before identifying implementation and test locations.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
cli, devops
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.