I am running nginx in a docker container. I have to RELOCATE the nginx log files from /var/log/nginx/error.log
and /var/log/nginx/access.log
to different locations. For this I need to modify the /etc/nginx/nginx.conf
file in my docker image. What can I mention in my dockerfile to make this modification?
I do not want to re-write the nginx.conf
file with commands like echo
.
You don't need to rewrite using echos, it's easier than that.
nginx.conf
to your needs.Dockerfile
COPY nginx.conf /etc/nginx/nginx.conf