Docker image with the build environment for the NGINX VOMS Module
This folder contains the Dockerfile for the build environment of the NGINX VOMS
module, as an extension of the storm2/build
image.
The build environment is based on the NGINX distribution provided by OpenResty.
Building the image
sh build-image.sh
Using the image
docker run -it storm2/ngx-voms-build
Once inside the container, the openresty binaries are installed inside ${HOME}/local/openresty
and the source is available in ${HOME}/openresty-
version. For convienence, the environment variable RESTY_CONFIG_OPTIONS
contains the options used during the configuration of the existing installation plus the location of the luajit
installation, so the latter is not rebuilt every time configure
is run.
In order to re-configure, re-build and re-install openresty, for example to change build options or to add another module, simply run:
$ cd openresty-x.y.z
$ ./configure ${RESTY_CONFIG_OPTIONS} --with-debug --with-cc-opt="-g -O" --add-module=<location>
$ make
$ make install
For convenience, a script called build-install-ngx-voms.sh
is available in ${HOME}
that runs the above commands for the ngx_http_voms_module
. It also adds some flexibility in order to adapt to interactive and continuous integration environments. The script requires the locations of the openresty
bundle and of the ngx_http_voms_module
code (for example as checked-out from git); the locations are expressed by the environment variables OPENRESTY_ROOT
and NGX_HTTP_VOMS_MODULE_ROOT
respectively. If they are not set, they are guessed:
- a unique
openresty
bundle is looked for in${HOME}
- the
ngx_http_voms_module
code is looked for in the working directory of the continuous integration environment first and then in${HOME}
Unfortunately the configuration phase of the build generates a header file that is included in each translation unit, so expect everything to be rebuilt. On the other hand the compilation is not overly long.