A Dockerfile to build nginx rpm for CentOS 6 and 7 using fedora copr.
This build includes the following modules as dynamic modules:
- openresty/lua-nginx-module
- openresty/headers-more-nginx-module
- cloudflare/lua-upstream-cache-nginx-module
- wandenberg/nginx-sorted-querystring-module
- arut/nginx-rtmp-module
- FRiCKLE/ngx_cache_purge
- replay/ngx_http_secure_download
- replay/ngx_http_consistent_hash
- openresty/srcache-nginx-module
- openresty/redis2-nginx-module
- openresty/memc-nginx-module
- openresty/lua-upstream-nginx-module
- openresty/echo-nginx-module
- bpaquet/ngx_http_enhanced_memcached_module
- arut/nginx-dav-ext-module
Warning: Modules may be added or deleted without notice.
- Copy
.envrc.exampleto.envrc. - Go https://copr.fedoraproject.org/api/ and login in and see the values to set.
- Then modify
.envrc
To build the docker image to build the srpm or rpm files, run the following command.
./docker_wrapper.sh build
To try building rpm files with mock, run the following command.
source .envrc
./docker_wrapper.sh bash
Then in the docker container, run the fowllowing command to build rpms with mock.
./build.sh mock
If the build finish successfully, run the following command to upload the srpm file to copr.
./build.sh copr
If you are sure your rpms will be built successfully, skip the above section "Build rpms interactively" and run the following command to run the docker image to build the srpm file and upload it to copr.
source .envrc
./docker_wrapper.sh run
I recommend you to use direnv/direnv
instead of running source .envrc yourself.
- Edit
imagenameindocker_wrapper.sh - See NOTE comments in
script/build.shand edit variables and commands - Put the spec file in the
SPECSdirectory - Put the source files in the
SOURCESdirectory
MIT