https://dagster.io/ logo
#ask-ai
Title
# ask-ai
t

Thomas Rolfsnes

03/13/2024, 8:41 AM
How can I automatically remove stopped containers when using the docker dagster agent?
s

Scout

03/13/2024, 8:41 AM
There was an error processing your request. Please try again.
t

Thomas Rolfsnes

03/13/2024, 8:42 AM
@Scout How can I automatically remove stopped containers when using the docker dagster agent?
s

Scout

03/13/2024, 8:42 AM
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.
6 Views