Public | Automated Build

Last pushed: 2 years ago
Short Description
kafka-mesos-docker ( kafka_2.11- , kafka-mesos- )
Full Description


A docker image modified from mesos/kafka, built on Oracle JRE 8 in Alpine;

/opt/kafka-mesos folder will contain following content:

  • kafka*.tgz - kafka distro;
  • kafka-mesos*.jar - kafka-mesos distro;
  • - shell script to run kafka-mesos;

No default configuration file for kafka-mesos is provided. All configuration params should be
specified via cli options.

Running image

Running image using docker. Required networking params should be provided. Image has no entry point,
so ./ should be specified explicitly.


# sudo docker run -it -p 7000:7000 --add-host=master: yyqqing/kafka-mesos ./ scheduler \
--master=master:5050 --zk=master:2181 --api=http://<accessible-ip>:7000 --storage=zk:/kafka-mesos

Where accessible-ip - is the IP address of running host, accessible from mesos nodes.

Note: if you want to inspect image content you can skip specifying ./ entry point.
In that case you will get shell access.

Running image in Marathon

To run image in Marathon it is better to pre-pull image on all required nodes using:

# sudo docker pull <image-name>

After that, scheduler process could be created via Marathon API via POST /v2/apps call.

    "container": {
        "type": "DOCKER",
        "docker": {
            "network": "HOST",
            "image": "$imageName"
    "cpus": 0.5,
    "mem": 256,
    "ports": [7000],
    "cmd": "./ scheduler --master=master:5050 --zk=master:2181 --api=http://master:7000 --storage=zk:/kafka-mesos",
    "instances": 1,
    "constraints": [["hostname", "LIKE", "master"]]

Then the cli should be able to connect to url http://master:7000 from your api client machine
(typically different than the mesos slaves). Example:

# ./ broker list --api=http://master:7000
no brokers

Now you can configure and start brokers.

Docker Pull Command
Source Repository