version: '3'
services:
coredns:
image: coredns/coredns
container_name: coredns
restart: always
volumes:
- /home//Documents/docker/coredns/:/root/
ports:
- "53:53/udp"
command: -conf /root/Corefile
This should do it.
This was your solution, if that is not an option than there is no solution.