title: local dask cluster using docker-compose
body: <p>I want to create a docker-compose.yml containing our company analysis toolchain. For this purpose, I add dask. The docker-compoe.yml looks like this:</p>
  
  <p><strong>docker-compose.yml</strong></p>
  
  <pre><code>version: '3'
  services:
    jupyter:
      build: docker/jupyter/.
      ports:
        - "8899:8899"
      depends_on: 
        - dask-scheduler
        - dask-worker
      volumes:
        - ./notebooks:/notebooks
  
    dask-scheduler:
      build:
        docker/dask/.
      hostname: dask-scheduler
      ports:
        - "8786:8786"
        - "8787:8787"
      volumes:
        - ./notebooks:/notebooks
      command: ["dask-scheduler"]
  
    dask-worker:
      build:
        docker/dask/.
      depends_on:
        - dask-scheduler
      volumes:
        - ./notebooks:/notebooks
      command: ["dask-worker", "tcp://dask-scheduler:8786"]
  </code></pre>
  
  <p>For building up the both dask containers, I use this Dockerfile:</p>
  
  <p><strong>docker/dask/Dockerfile</strong></p>
  
  <pre><code>FROM python:3.7
  RUN apt-get update -y &amp;&amp; apt-get install -y python3-pip libsnappy-dev
  RUN pip install numpy
  RUN pip install dask
  RUN pip install distributed
  RUN pip install fsspec
  RUN pip install fastavro
  RUN pip install python-snappy
  RUN pip install dask[bag]
  RUN pip install dask[dataframe]
  RUN pip install jupyter-server-proxy
  
  # Dashboard
  EXPOSE 8787
  # Scheduler
  EXPOSE 8786
  
  </code></pre>
  
  <p>In my notebook, I use following code snipped to connect to the scheduler:</p>
  
  <pre class="lang-py prettyprint-override"><code>from dask.distributed import Client
  client = Client(address="dask-scheduler:8786")
  client.dashboard_link 
  </code></pre>
  
  <p>=> '<a href="http://dask-scheduler:8787/status" rel="nofollow noreferrer">http://dask-scheduler:8787/status</a>' </p>
  
  <p>Using the IP of the container also not works.</p>
  
  <p>this allows me to do my requested computation and works fine. But what is not working is the dashboard, that should be available on <a href="http://localhost:8787/status" rel="nofollow noreferrer">http://localhost:8787/status</a>. This just returns</p>
  
  <pre><code>404: Not Found
  </code></pre>
  
  <p>My questions 1 is: <strong>What I am doing wrong?</strong> I found the 
      --dashboard-address</p>
  
  <p>argument in the docs and tried various combinations, but this now made any changes regarding the  output of the dashboard. This goes to my second question:</p>
  
  <p><strong>Why is the argument available in the scheduler and the worker</strong></p>
  
  <p>and finally what changes I need to do, to make it work? Using Docker Desktop Community on Mac OS Version 2.3.0.3 with Engine 19.03.8</p>
  
  <p>Thanks for any hints.</p>