title: docker-compose: can't specify nginx config
body: <p>I'm trying to setup an nginx container via docker-compose. I have a custom configuration I'd like to use. I make the config available on a volume that is shared with the container.</p>
  
  <pre><code>nginx:
        volumes:
        - shared:/shared
        image: nginx
        ports:
        - "8080:80"
        - "443:443"
        command: /bin/bash -c ./shared/nginx_test.conf
  </code></pre>
  
  <p>Here is the configuration file:</p>
  
  <pre><code>daemon off;
  
  http {
      server {
      location / {
          root /shared/data/www;
      }
  
      location /images/ {
          root /data;
      }
      }
  }
  </code></pre>
  
  <p>When I do a docker-compose up, I get errors for each line in the config that say the command is not found. e.g. <code>./shared/nginx_test.conf: line 1: daemon: command not found</code>, <code>./shared/nginx_test.conf: line 3: http: command not found</code> and so on.</p>
  
  <p>I tried following the guide <a href="https://github.com/docker-library/docs/tree/master/nginx" rel="nofollow">here</a>. Any ideas on why the commands are not found by nginx?</p>