Hi! I hope it's ok to ask again: <https://dagster....
# ask-community
j
Hi! I hope it's ok to ask again: https://dagster.slack.com/archives/C01U954MEER/p1708522685593659 What is a good way to handle stale Dagster containers/images in the docker compose setup to prevent us from running out of storage?
z
Maybe just something simple like a chron job that runs
docker system prune
or something like that?
Does docker compose have an option similar to
--rm
for
docker run --rm <container>
?
j
Thanks! I considered both alternatives
Both are possible with docker compose.
I was hoping for a more specialized solution for Dagster since it is creating quite a few containers.
The remove operations are somewhat dangerous since in case an application is down for some reasons it might remove "used" containers by accident.
I'll try to limit this by filtering for containers that have not been used for 14 days, which should be a good enough solution.
(and yes obviously it would be great if any permanent configuration was stored externally instead of in the containers, but that is not the case yet in our setup)