I have a Dockerfile and custom nginx configuration file (in the same directory with Dockerfile) as follows:
Dockerfile:
FROM nginx COPY nginx.conf /
official nginx docker hub manual page:
docker run --name my-custom-nginx-container -v /host/path/nginx.conf:/etc/nginx/nginx.conf:ro -d nginx