I have a nginx docker instance running. In the docker instance there is a file called
/etc/nginx/nginx.conf
It has the following settings
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request"
access_log /var/log/nginx/access.log main;
sendfile on;
....
}
I run the docker instance by running with the following command.
docker run -d -P -v /Users/user/site:/usr/share/nginx/html --name mysite nginx
How would I run the above command but have it change the config setting to turn off sendfile?
This answer looks similar to mine. Would I need to create a build file? Im a bit confused.
Just inject your own config file as a volume.
Let say you have a conf file in /tmp, then you can run the container with :