Docker Community Forums

Share and learn in the Docker community.

How to sync contrainer file into my volume?

I want to config my nginx in docker contrainer , but cannot edit nginx.conf file in contrainer. I mout a volume target to /etc/nginx(nginx.conf path). why not the dir’s files cannot sync into my volume dir. please give me a way to do this.
This is my cmd

docker run --name nginx --mount source=nginx_html,target=/usr/share/nginx/html,readonly \
–mount source=nginx_conf,target=/etc/nginx/conf,readonly -p 80:80 -d nginx