How can I automatically remove stopped containers ...
# ask-ai
t
How can I automatically remove stopped containers when using the docker dagster agent?
s
There was an error processing your request. Please try again.
t
@Scout How can I automatically remove stopped containers when using the docker dagster agent?
s
To automatically remove stopped containers when using the Docker Dagster agent, you can set the
auto_remove
parameter to
true
in your
dagster_cloud.yaml
file. This parameter is part of the
container_kwargs
configuration. Here's an example of how you can set it:
Copy code
yaml container_context:   docker:     container_kwargs:       auto_remove: true
By setting
auto_remove: true
, Docker will automatically remove the container when it exits. This configuration should help manage the cleanup of stopped containers without the need for manual intervention. Please note that this configuration is specific to the Docker agent in Dagster Cloud, and the documentation indicates that this was missing from the Docker agent docs but will be updated.