I have a web-application that I want to containerize with docker and reverse-proxy via nginx. This web application shall receive uploads of audio files (~200-500Mb), thus I want upload progress events while uploading to be sent to the client.
I decided to base my docker image (see dockerfile below) on an alpine base that also contains glibc. From there the idea was to install nginx from the alpine repositories and use the nginx upload progress module to send the progress events. This module is compiled into the nginx module on alpine by default (See Alpine Repository)!
Thus, I created a simple
nginx.conffile (see below) that just enables the
upload_progress uploads 1m;directive in the http-block and made sure it gets copied into the container to
I then started the container, installed nginx through
nginx -t. However, the conf file fails the test with this error message:
Troubleshooting so far
The error indicates that the binary does not have the upload progress module compiled in. However, this goes contrary to what is documented on the alpine repositories.
I also validated that the module is present in the binary by running a docker container with
nginx -Vinside it to get a dump of all the modules and flags it was compiled with. It contains the necessary
--add-dynamic-module=/home/buildozer/aports/main/nginx/src/nginx-upload-progress-module-0.9.2/as expected (see nginx -V dump below).
The nginx.conf is not the issue. When I run the given nginx conf file locally where I have compiled the upload progress module into nginx, it runs fine.
So now I’m left confused, what am I doing wrong? Why can’t I use the
upload_progressdirective when the module exists in the nginx binary?
nginx -V dump
The error indicates that the binary does not have the upload progress module compiled in.
Yes, it isn’t. You compile it as a dynamic module using
If you have better answer, please add a comment about this, thank you!