appagile-nginx-sti-rhel7

AppAgile nginx STI Dockerfile

This STI nginx docker image inherits from RedHats SCL nginx-18-rhel7 docker image. It is extended with common tools for appagile images. It allows to configure nginx with configurations located in a git.

How to build this Dockerfile

Building this Dockerfile requires a Red Hat Enterprise Linux 7 host system with Software Collections entitlements available.

To build the Dockerfile, run:

“`

cd image

docker build -t test/appagile-nginx18-sti-rhel7:1.0.0 . .

“`

General container help

Run docker run THIS_IMAGE container-usage to get this help.

Run docker run -ti THIS_IMAGE bash to obtain interactive shell.

Run docker exec -ti CONTAINERID container-entrypoint to access already running container.

In order to get the container ID after running the image, pass --cidfile= option to the docker run command. That will instruct Docker to write a file with the container ID.

You may try -e CONT_DEBUG=VAL with VAL up to 3 to get more verbose debugging info.

Build a new image from this STI Builder image

Run ./s2i build https://gitdev.tsi-af.de/ose3/appagile-nginx18-sti-rhel7.git --context-dir=samples/nginx-proxy test/appagile-inx18-sti-rhel7:1.0.0 demo-proxy Rundocker run -it demo-proxy`

Configuration of nginx

Sample configuration files can be found in ./samples. Files lacated here will replace the ones coming with nginx.

You can use placeholder in configuration files. These will be replaced by its according environment variable, e.g.: location / { proxy_pass ${PROXY_URL}; }

${PROXY_URL} will be replaced with the value of environment variable PROXY_URL.

AppAgile / Openshift

A template for Openshfit 3 can be found in folder ose-artefacts. This can be used as a guiding template to create a new one.