title: docker mount nfs with local_lock=all
body: <p>I have docker-compose.yml file</p>
  
  <pre><code>volumes:
    nfs:
        driver: local
        driver_opts:
          type: nfs
          o: addr=192.168.100.1,rw
          device: ":/mnt/storage"
  </code></pre>
  
  <p>my container have mounted volume with options:</p>
  
  <pre><code>type nfs (rw,relatime,vers=3,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.100.1,mountvers=3,mountproto=tcp,local_lock=none,addr=192.168.100.1)
  </code></pre>
  
  <p>with <strong>local_lock=none</strong> and i can't change this option to <strong>local_lock=all</strong>
  I tried:</p>
  
  <pre><code>volumes:
    nfs:
        driver: local
        driver_opts:
          type: nfs
          o: addr=192.168.100.1,rw,local_lock=all
          device: ":/mnt/storage"
  </code></pre>
  
  <p>and</p>
  
  <pre><code>volumes:
    nfs:
        driver: local
        driver_opts:
          type: nfs
          o: addr=192.168.100.1,rw
          device: ":/mnt/storage"
          local_lock: all
  </code></pre>
  
  <p>but nothing changes</p>