This section defines the step-by-step instructions to build Ubuntu Linux based Docker image for Siddhi Runner Distribution 5.1.x.
- Docker v17.09.0 or above
Here we create a base image which contains the default released Siddhi Runner distribution.
git clone https://github.com/siddhi-io/docker-siddhi.git
The local copy of the
docker-files/siddhi-runner/ubuntu
directory will be referred to asDOCKERFILE_HOME
from this point onwards.
For the base, navigate to <DOCKERFILE_HOME>/base
directory. You can create the Siddhi runner docker image in two modes such as release mode and local mode. In the release mode, the Siddhi runner pack will be downloaded from GitHub releases. Thus, to build a Siddhi runner docker image in release mode use the following build command.
docker build -t siddhiio/siddhi-runner-base-alpine:5.1.x .
You can also build a Siddhi runner docker image in local mode, which means here it uses a local Siddhi runner pack instead of downloading from GitHub. To do that you have to copy the local Siddhi runner zip file to <DOCKERFILE_HOME>/base/files/pack
directory. After that, you can run the following command to build the Siddhi runner image.
docker build -t siddhiio/siddhi-runner-base-alpine:5.1.x .
Here we create the Siddhi Runner image bundling the needed extensions and client jars.
<DOCKERFILE_HOME>/siddhi-runner/files/ contains two directories (bundles and jars directories) where you can copy the Jars and Bundles you need to bundle into the docker image.
- Jars directory - Maintained for Jar files which may not have their corresponding OSGi bundle implementation. These Jars will be converted as OSGI bundles and copied to Siddhi Runner docker image during docker build phase.
- Bundles directory - Maintained for OSGI bundles which you need to copy to Siddhi Runner docker image directory during docker build phase.
Execute docker build
command as shown below.
+ docker build -t siddhi-runner-ubuntu:5.1.x .
+ `docker run -it siddhi-runner-ubuntu:5.1.x`