title: Docker compose Are you trying to mount a directory onto a file (or vice-versa)?
body: <p>I am on Docker Version 20.07 and i am trying to Mount my config files.</p>
  <p>My Docker compose looks like this -:</p>
  <pre><code>version: '2'
  services:
    prometheus:
      image: prom/prometheus
      ports:
        - '9090:9090'
      container_name: prometheus
      restart: always
      volumes:
        - './prometheus/prometheus.yml:/etc/prometheus/prometheus.yml'
    grafana:
      image: grafana/grafana
      ports:
        - '3000:3000'
      container_name: grafana
      restart: always
      depends_on:
        - prometheus
      volumes:
        - './grafana/config/grafana.ini:/etc/grafana/grafana.ini'
  </code></pre>
  <p>And my Folder structure looks like this :-</p>
  <pre><code>Root
  Monitoring_Stack
  -- prometheus.yml
  -- grafana.ini
  -- docker-compose.yml
  </code></pre>
  <p>And when i do <code>docker-compose up -d</code>, I keep getting :-</p>
  <pre><code>ERROR: for prometheus  Cannot start service prometheus: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: rootfs_linux.go:76: mounting &quot;/run/desktop/mnt/host/d/Docker/monitoring_stack/prometheus/prometheus.yml&quot; to rootfs at &quot;/etc/prometheus/prometheus.yml&quot; caused: mount through procfd: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type        
  ERROR: Encountered errors while bringing up the project.
  </code></pre>
  <p>Any help will be appreciated as to what i am doing wrong? Thank you.</p>