How to use dns_opt in docker-compose version 3

When I use docker-compose in version 3, how can I use dns_opt? Is there have any other way?