Clank can be built and deployed as a docker micro-service stack using the following steps.
- Configure the JSON files in the project root
config/
along with any plugins you may wantplugins/
. - Configure
docker-settings.sh
(this specifies the build parameters) anddocker-run.sh
(this will be the script that starts the servers inside the container). - Build the Docker image using
./docker-build.sh
. - You can now run the docker image and setting the
CLANK_CONFIG
to the config file (without theconfig/
directory prefix). For examplemas.json
.
Note: once you build the image, the configuration files are already copied over,
therefore if you want to modify the configuration you will need to rebuild the image.
This also includes any changes to the docker-run.sh
file.
Examples:
# Example usage
docker run -it --rm -h ${HOSTNAME} -p ${HOST_TCP_PORT}:8080/tcp -e CLANK_CONFIG=config.json --name ${CONTAINER_NAME} clank
# Run a Clank MAS
docker run -it --rm -h clank-mas -p 10075:10075/tcp -e CLANK_CONFIG=mas.json --name clank-mas clank
# Run a Clank DME Server
docker run -it --rm -h clank-dme -p 10079:10079/tcp -p 51000:51000/udp -e CLANK_CONFIG=dme.json --name clank-dme clank
If you just want to quickly see an example you can run ./example-mas.sh
after building
to deploy a Clank Medius Authentication Server that runs on TCP port 10075 and uses the
configuration file clank/mas.json
.