There is one thing you have missed. Mounted file should already exist inside docker host before mounting. Otherwise docker creates a directory instead.
So you need to create nginx.conf empty file before mounting
nginx.conf