Run Monika in Docker

Star (0)

Monika is available as a docker image. You can find the image in the docker hub as hyperjump/monika, or pull the image with the following command:

docker pull hyperjump/monika

Once you've pulled the latest image, you can run it using:

# Run Monika in foreground
docker run --name monika --net=host -it hyperjump/monika:latest
# Or, if you prefer to run Monika in the background
docker run --name monika --net=host --detach hyperjump/monika:latest

In the example above, we create a container from the hyperjump/monika base image naming it with--name monika, indicate we'll use the host machine's network configuration with --net=host and let it run in the backround using the --detach switch (or interactively with -it).

Once monika is up and running, you can see its log using

docker logs monika

Or you can stop the container with

docker stop monika

For more complex probing, for example to use your existing customized configuration and have the prometheus plugin. First copy your personalized config to a directory, say /config. Then create your container with the directory mounted as a --volume (-v) for the container to use, like so:

docker run --name monika_interactive \
--net=host \
-v ${PWD}/config:/config \
-d hyperjump/monika:latest \
monika -c /config/myConfig.yml --prometheus 3001


Genererally when facing issues with your container or configuration, try the same configuration YAML using regular monika. For instance:

monika -c myConfig.yml --prometheus 3001

Ensure your container is up and running by issuing simple commands/parameters:

docker run --name monika_interactive \
-it hyperjump/monika:latest monika --help

For further docker commands and documentation, visit the official Docker documentation here.

If all else fails, hit us up at monika discussions or file an issue.

PT Artha Rajamas Mandiri (Hyperjump) is an open-source-first company providing engineering excellence service. We aim to build and commercialize open-source tools to help companies streamline, simplify, and secure the most important aspects of its modern DevOps practices.

Copyright © 2022 Hyperjump Tech. All Rights Reserved.