I'm attempting to bake the following Nginx reverse proxy configuration into a docker image:
    server {
        listen 80;
        server_name 203.0.113.2;
        proxy_set_header X-Real-IP  $remote_addr; # pass on real client IP
        location / {
            proxy_pass http://203.0.113.1:3000;
        }
    }
I'm currently just putting that into a volume and mapping it like this:
-v nginx-data:/etc/nginx/conf.d/
That works and it when started the container performs as a reverse proxy, but when I bake it in like this:
Dockerfile
  FROM nginx
  COPY gogs.conf /etc/nginx/conf.d/gogs.conf
Start the container from the image like this:
docker run --name gogs-nginx-container -d gogs-nginx
And finally visit it at its assigned IP address http://172.17.0.3/ I just get the "Welcome to Nginx" page, instead of seeing and it does not redirect to 203.0.113.1:3000.
Any ideas on how to troubleshoot this?
docker logs gogs-nginx-containerit only tells me that I tried to connect along with the response codes, which are 304s. I'm copying the configuring to the same place I mount it when running the vanilla nginx image, so it should work ...