Skip to content

Add a configuration option to allow decide whether to prune volumes or not #217

Description

@emibcn

Hi @reubenmiller ,
We have some special volumes we don't ant to be removed when removing the compose where they where created. When stopping and removing a compose project, it shows the args, which includes --volumes:

2026/07/06 10:39:42 INFO Removing compose project. name=myproject dir=/var/lib/tedge-container-plugin/compose/myproject command=docker args="compose down --remove-orphans --volumes"

I believe a couple more options could be added:

  • One to force all volumes to be pruned or not. It is currently being done (as if the option is now set to prune_volumes = True). I guess this solution would be the easiest one to implement (and we would set it to False).

  • One for each volume or deployment. We would like to control whether that --volumes is being added, with as much granularity as possible. I don't know if it should be done in the config file (for example, having an array of volumes to maintain or projects whose volumes should not be purged), in the software definition itself (having a tick box to enable/disable volumes being purged), or in the docker-compose.yml file (for example, using a custom option, like x-volumes-keep).

Regards.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions