I have Dagster deployed in a AWS EC2, using Docker...
# ask-community
l
I have Dagster deployed in a AWS EC2, using Docker. Is there a way of telling Dagster to automatic prune the container after execute the job?
🤖 1
i
We have the docker prune command set up on a cronjob, and that works fine
l
@Isaac Harris-Holt I thought about doing that too. but I believe that because it is something a little basic, it should already come as a configurable parameter in Dagster
d
Hi Lucas - you can set this on the DockerRunLauncher to automatically clean up the container as soon as it finishes:
Copy code
run_launcher:
  module: dagster_docker
  class: DockerRunLauncher
  config:
    container_kwargs:
      auto_remove: true
(the big thing you lose there is a way to check the logs for finished runs, e.g. for debugging)