Docker Community Forums

Share and learn in the Docker community.

Docker multi wordpress containers - how to customize nginx conf?


Currently I am in the process of migrating a single instance of nginx on server (with multi server blocks) to docker containers where each will have its own individual nginx and db.

I have successfully installed multi wordpress via docker using: GitHub - evertramos/docker-wordpress: Wordpress Docker container using SSL Certificates with LetsEncrypt

However, once its inside the containers, how do I put in the rest of my original nginx conf server block codes into each container?

e.g. this code:

location ~* ^.+.(png|jpe?g)$ {
add_header Vary Accept;
try_files $uri$webp_suffix $uri =404;

Can’t seem to figure this part out.

Many thanks.