title: Mount nfs to container with docker compose
body: <p>Does anyone know how to mount an NFS to a docker container using docker compose? I keep getting the same error each time I run 'docker compose up':</p>
  <pre><code>Error response from daemon: error while mounting volume '/var/lib/docker/volumes/test_data/_data': failed to mount local volume: mount /etc/hapee-2.2/certs:/var/lib/docker/volumes/test_data/_data, data: addr=10.15.50.27,nolock,soft: invalid argument
  </code></pre>
  <p>Exports file from the NFS appears to be set up correctly. I've tried deleting '/home/' from the file path as well. IP address is redacted.</p>
  <pre><code>/etc/hapee-2.2/certs &lt;ipaddressofpc&gt;(rw,sync,no_subtree_check,no_root_squash)
  </code></pre>
  <p>I keep suspecting the docker-compose.yml, but I'm not sure what the issue with it would be</p>
  <pre><code>version: '3.7'
  
  services:
    hapee:
      image: haproxy:2.2
      container_name: test
      restart: always
      ports:
        - &quot;80:80&quot;
        - &quot;443:443&quot;
        - &quot;8888:8888&quot;
      volumes:
        - data:/etc/hapee-2.2/certs
      logging:
        options:
           max-size: 100m
           max-file: &quot;3&quot;
  
  volumes:
    data:
      driver_opts:
        type: &quot;nfs&quot;
        o: &quot;addr=10.15.50.27,nolock,soft,ro&quot;
        device: &quot;/etc/hapee-2.2/certs&quot;
  </code></pre>
  <p>Alternatively, does anyone know another method of mounting SSL certificates to an HA Proxy container with docker compose?</p>
  <p>Thanks!</p>