The headers-more-nginx-module module compilation automatize for different Nginx versions.
The module can be compiled or downloaded binary.
- Download
ngx_http_headers_more_filter_module.so
- Load module to Nginx with load_module
Check official document for configurations.
docker build --build-arg nginx_version=1.19.0 --build-arg more_header_module_version=v0.33 -t bkayranci/nginx-more-header-module .
docker-compose build
Check it on DroneCI Cloud or Github Releases
FROM bkayranci/nginx-more-header-module:nginx-1.19.0_more-header-module-v0.33 AS module
FROM nginx:1.19.0-alpine
COPY --from=module /modules /etc/nginx/modules
COPY default.conf /etc/nginx/conf.d/default.conf
RUN echo 'load_module "/etc/nginx/modules/ngx_http_headers_more_filter_module.so";' > /etc/nginx/nginx.conf.temp
RUN cat /etc/nginx/nginx.conf >> /etc/nginx/nginx.conf.temp
RUN mv /etc/nginx/nginx.conf.temp /etc/nginx/nginx.conf
git clone https://github.com/bkayranci/nginx-more-header-module.git
cd nginx-more-header-module/example
docker-compose up -d