Skip to content

Add Docker cleanup strategy to prevent storage drift on Pi/server #336

@fe51

Description

@fe51

Pitch

Each deploy creates a new container (old one is explicitly removed),
orphaning its logs and leaving dangling images from the local build.
On a Pi/server with limited storage this accumulates silently.

Technical suggestions

Two options to discuss:

  • Deploy-time: add a docker system prune -f task in the engine role
    (or deploy-engines playbook), runs on each deploy
  • Cron: add a periodic docker system prune -f in engine_cron role,
    decoupled from deploy

Note: avoid docker system prune -af in cron — would delete local tagged
images if container is temporarily stopped.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions