Dockerfile icon indicating copy to clipboard operation
Dockerfile copied to clipboard

nginx - Set directive into 'main' context; i.e.: "worker_processes"

Open vlauciani opened this issue 2 years ago • 0 comments

Hi

Reading the guide here:

  • https://dockerfile.readthedocs.io/en/latest/content/DockerImages/dockerfiles/php-nginx.html

or the issue:

  • https://github.com/webdevops/Dockerfile/issues/399

I understand that to update the nginx conf I need to add my file into /opt/docker/etc/nginx/conf.d directory; this adds the configuration into http {} context. For example I can add multiple server {} context:

http {
  server {
  }
  server {
  }
}

But how I can add directive like worker_processes that is in main context? Should I override the file /etc/nginx/nginx.conf?

Thank you

vlauciani avatar Sep 15 '23 09:09 vlauciani