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

MarvinK

09/21/2022, 2:19 PM
Hi, question about the DockerRunLauncher. My dagit, dagster, postgresdb and user code server are configured in my docker-compose with a network "docker_network". Communication works fine. My setup is accordingly to the docker-deploy example https://github.com/dagster-io/dagster/tree/master/examples/deploy_docker Now I wanted to use the DockerRunLauncher, but I encounter an error. If i don't specify a network in the dagster.yaml and start a job, the container will be created and starts, but will throw errors because it can't connect to my postgres container. (Cant resolve the hostname because no network) If I specify a network in the dagster.yaml, to ensure that the hostname of my postgres can be resolved, I get following error:
docker.errors.NotFound: 404 Client Error for <http+docker://localhost/v1.41/containers/7d273d70cfca87e7f2e292ff71a4277e64eaeb7f62a963594b2b1bcdb0335912/start>: Not Found ("network docker_network not found")
Why does the networking not work? This is my dagster.yaml
Copy code
run_launcher:
  module: dagster_docker
  class: DockerRunLauncher
  config:
    env_vars:
      - DAGSTER_POSTGRES_USER
      - DAGSTER_POSTGRES_PASSWORD
      - DAGSTER_POSTGRES_DB
    network: docker_network
    container_kwargs:
      volumes: # Make docker client accessible to any launched containers as well
        - /var/run/docker.sock:/var/run/docker.sock
d

daniel

09/21/2022, 2:45 PM
Hi @MarvinK - do you hit this same error if you run the deploy_docker example without making any changes and launch a run? Because as far as I know the example has the same setup that you're describing where the run launcher specifies a network - so if that example works but your setup does not, I think it would be a matter of figuring out where they differ
m

MarvinK

09/21/2022, 2:58 PM
Hi daniel, thanks for your fast reply. I just found the problem, it's around docker. (I am on Docker Desktop for Windows) In my docker-compose.yml I define the network "docker_network". But when I run 'docker network ls' I can see, that "docker_network" is not the actual name of the network. For me the network name is as following. If this is the path of my docker-compose: folder-a/folder-b/docker-compose.yml Then the network name is 'folder-b_docker_network' And because of that the DockerRunLauncher couldn't find the stated network.
d

daniel

09/21/2022, 2:59 PM
Ah, I see - tricky
10 Views