https://dagster.io/ logo
#ask-community
Title
# ask-community
l

Lucas Gabriel

08/01/2022, 2:42 PM
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

Isaac Harris-Holt

08/01/2022, 2:44 PM
We have the docker prune command set up on a cronjob, and that works fine
l

Lucas Gabriel

08/01/2022, 2:47 PM
@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

daniel

08/01/2022, 11:34 PM
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)
4 Views