https://dagster.io/ logo
Title
l

Loc Nguyen

10/16/2021, 7:09 PM
Hi everyone, not sure if this question has been answered (I can't find anything regarding this). I have followed the example of deploy using Docker (https://docs.dagster.io/deployment/guides/docker#example). Need to make some changes but it works nicely now, able to execute manually and run on schedule. However, every run job leaves behind a container that I need to prune. Is there any settings to remove them after finished running? or maybe a way to pass argument to Docker run so I can pass --remove at runtime ? Thanks in advance!
t

Thomas

10/17/2021, 2:13 PM
With
--rm command ?
docker run --rm my-docker
l

Loc Nguyen

10/17/2021, 2:17 PM
I know that but I deploy Dagster using Docker and it is using DockerRunLauncher to create new container for every run so I don't know where to set the configuration for DockerRunLauncher :( di know that, but Dagster is using
t

Thomas

10/17/2021, 2:19 PM
Ok ! I see a container_kwargs https://docs.dagster.io/_apidocs/libraries/dagster-docker#dagster_docker.DockerRunLauncher There is an auto_remove in docker-py maybe ?
run_launcher:
  module: dagster_docker
  class: DockerRunLauncher
  config:
    env_vars:
      - DAGSTER_POSTGRES_USER
      - DAGSTER_POSTGRES_PASSWORD
      - DAGSTER_POSTGRES_DB
  container_kwargs:
    auto_remove: true
    volumes:
      - repo.py:/opt/dagster/app/
in dagster.yaml ?
❤️ 1
:condagster: 1
l

Loc Nguyen

10/17/2021, 2:22 PM
hummm interesting, probably this is the one I need 😮 lets me try it out
Much thanks 😄
t

Thomas

10/17/2021, 2:23 PM
Great that help 🙂