docker build -t iconoeugen/s2i-reveal-js .
To make the presenation available under a different context path, you can change the the following line accordingly:
export CONTEXT_PATH=/
Download the latest Openshift S2I tool and run the build:
s2i build https://github.com/iconoeugen/s2i-reveal-js.git --context-dir=test/test-app -e CONTEXT_PATH=${CONTEXT_PATH} iconoeugen/s2i-reveal-js reveal-js-sample-app
Test the generated documentation:
docker run -p 8080:8080 reveal-js-sample-app
Accessing the application:
curl http://127.0.0.1:8080/${CONTEXT_PATH}
To start each script manually to build the presentation and to run the HTTP server, you can start a docker instance:
docker run -it --rm -p 8080:8080 -u $UID -v $PWD/test/test-app:/tmp/src iconoeugen/s2i-reveal-js bash
To build the presentation inside the running container:
/usr/libexec/s2i/assemble
To run the HTTP server inside the running container:
/usr/libexec/s2i/run
To set these environment variables, you can place them as a key value pair into a .s2i/environment file inside your source code repository.
-
CONTEXT_PATH
The prefix of a URL path where the presentation will be made available. (Default:
/
)
docker run -it --rm -u $UID -v docs:/opt/app-root/src s2i-reveal-js bash
Populate the presentation with a new Sphix documentation
You must create an image stream for the S2I image builder before creating an application:
oc create -f openshift/image-stream.json -n openshift
To upload the template to your current project’s template library, pass the JSON file with the following command:
oc create -f openshift/template.json