title: Docker: ERROR Cannot start service nginx: OCI runtime create failed
body: <p>I'm using docker-compose for nginx service, here is the <strong>docker-compose.yml</strong> file:</p>
  
  <pre><code>version: '3'
  
  networks:
    laravel:
  
  
  services:
    nginx:
      image: nginx:stable-alpine
      container_name: nginx
      networks:
        - laravel
      ports:
        - "8088:80"
      volumes:
        - ./src:/var/www/html
        - ./nginx/default.conf:/etc/nginx/conf.d/default.conf
      depends_on:
        - php
        - mysql
  
  
    mysql:
      image: mysql:5.7.22
      container_name: mysql
      restart: unless-stopped
      tty: true
      ports:
        - "4306:3306"
      volumes:
        - ./mysql:/var/lib/mysql
      environment:
        MYSQL_DATABASE: homestead
        MYSQL_USER: root
        MYSQL_PASSWORD: secret
        MYSQL_ROOT_PASSWORD: secret
        SERVICE_TAGS: dev
        SERVICE_NAME: mysql
      networks:
        - laravel
  
    php:
      build:
        context: .
        dockerfile: Dockerfile
      container_name: php
      volumes:
        - ./src:/var/www/html
      ports:
          - "9000:9000"
      networks:
        - laravel
  </code></pre>
  
  <p>This is the <strong>default.conf</strong> file</p>
  
  <pre><code>server{
      listen 80;
      index index.php index.html index.htm;
      server_name localhost;
      error_log /var/log/nginx/error.log;
      access_log /var/log/nginx/access.log;
      root /var/www/html/public;
  
      location / {
          try_files $uri $uri/ /index.php?query_string;
      }
  
  
      location ~ \.php$ {
          try_files $uri =404;
          fastcgi_split_path_info ^(.+\.php)(/.+)$;
          fastcgi_pass php:9000;
          fastcgi_index index.php;
          include fastcgi_params;
          fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
          fastcgi_param PATH_INFO $fastcgi_path_info;
      }
  }
  </code></pre>
  
  <p>This is the result of docker-compose up:</p>
  
  <blockquote>
    <p>ERROR: for nginx  Cannot start service nginx: OCI runtime create
    failed: container_linux.go:346: starting container process caused
    "process_linux.go:449: container init caused \"rootfs_linux.go:58:
    mounting \\"/d/wamp64/www/instawash/nginx/default.conf\\" to rootfs
    \\"/mnt/sda1/var/lib/docker/overlay2/a0da06d30448a2583f346955c853cd3343982d96fb5e81b23be4cabad75a3c6b/merged\\"
    at
    \\"/mnt/sda1/var/lib/docker/overlay2/a0da06d30448a2583f346955c853cd3343982d96fb5e81b23be4cabad75a3c6b/merged/etc/nginx/conf.d/default.conf\\"
    caused \\"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</p>
  </blockquote>
  
  <p><strong>Tree directory</strong>:</p>
  
  <pre><code>    ├─── mysql/
      ├─── nginx/
      └─── src/
           docker-compose.yml
           Dockerfile
  </code></pre>