title: Docker: Cannot start service nginx
body: <p>I'm working on nginx service using docker-compose, I created the <strong>docker-compose.yml</strong> file :</p>
  
  <pre><code>    version: '2'
      services:
        nginx:
          image: nginx:1.11.8-alpine
          ports:
            - "8858:80"
          volumes:
            - ./site.conf:/etc/nginx/conf.d/default.conf
            - ./code:/usr/share/nginx/html
            - ./html:/myapp
            - ./site.conf:/etc/nginx/conf.d/site.conf
            - ./error.log:/var/log/nginx/error.log
            - ./nginx.conf:/etc/nginx/nginx.conf:ro
  </code></pre>
  
  <p>This is the <strong>site.conf</strong> file</p>
  
  <pre><code>    server {
      listen 80;
      index index.html index.php;
      server_name localhost;
      error_log  /var/log/nginx/error.log;
      location / {
         root /usr/share/nginx/html;
      }
  
      location /html {
         alias /myapp;
      }
  }
  </code></pre>
  
  <p>This is the result of <strong>docker-compose up</strong></p>
  
  <blockquote>
    <p>ERROR: for ef5152b88a7c_ef5152b88a7c_nginxdocker_nginx_1  Cannot start
    service nginx: oci runtime error: container_linux.go:247: starting
    container process caused "process_linux.go:359: container init caused
    \"rootfs_linux.go:54: mounting \\"/root/nginx-docker/nginx.conf\\"
    to rootfs
    \\"/var/lib/docker/aufs/mnt/b463f0e0ca95db8cd570dfb68fcf206df31e86998e725465a7673ca192af8342\\"
    at
    \\"/var/lib/docker/aufs/mnt/b463f0e0ca95db8cd570dfb68fcf206df31e86998e725465a7673ca192af8342/etc/nginx/nginx.conf\\"
    caused \\"not a directory\\"\""</p>
    
    <p>: 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>