Public Repository

Last pushed: 8 hours ago
Short Description
Small docker image for MongooseIM - robust and efficient XMPP server
Full Description


MongooseIM is Erlang Solutions' robust and efficient XMPP server aimed at large installations. Specifically designed for enterprise purposes, it is fault-tolerant, can utilize resources of multiple clustered machines and easily scale in need of more capacity (by just adding a box/VM).

Available image tags

All images in this repository are built on our travis ci infrastructure for:

  • master branch - tag latest
  • releases - tag is the same as on github
  • pull requests - tag is PR-{NUMBER} where {NUMBER} is PR number on github esl/MongooseIM

The Dockerfile used to build the images can be found here.

How to run single (first) instance

It is important to specify hostname (option -h) for the container. All hostnames should end with sufix -N. Where N is the number of container starting from one.

latest build from master branch

docker run -d -t -h mongooseim-1 --name mongooseim-1 -p 5222:5222 mongooseim/mongooseim:latest

latest build for a specific pull request

For example, in order to run image built for PR 1006, the command will look like the following:

docker run -d -t -h mongooseim-1 --name mongooseim-1  -p 5222:5222 mongooseim/mongooseim:PR-1006

Verifying if MongooseIM is running

telnet $DOCKER_HOST_IP 5222

Where $DOCKER_HOST_IP is either when running on linux or docker-machines IP when running on Max OS X. In the later case run docker-machine ip default to get the IP address.

The expected result is similar to following:

Connected to docker-machine-default.
Escape character is '^]'.

Exposed ports

This image exposes also other ports which might be useful, please refer to the Dockerfile

Adding some users

docker exec -i -t mongooseim-1 /usr/lib/mongooseim/bin/mongooseimctl register $USER $XMPP_HOST $PASSWORD


  • $USER - a username
  • $XMPP_HOST - the XMPP host served by MongooseIM - by default it's localhost
  • $PASSWORD - password used for authentication

Customising the configuration

Thanks to docker volumes it is possible to easily provide a custom configuration overriding the default one. In order to do that the image has to be run with configured volumes. Let's assume on the local machine there is directory mongooseim-1 and inside there is file ejabberd.cfg

tree mongooseim-1
└── ejabberd.cfg

Now we can run the container using command similar to the following one:

docker run -d -t -h mongooseim-1 --name mongooseim-1  -p 5222:5222 \
 -v `pwd`/mongooseim-1:/member mongooseim/mongooseim:PR-710

And the server will use the customized ejabberd.cfg file.

Other files which can be overridden in the same way are app.config and vm.args

Persisting Mnesia files

Mnesia files are kept in /var/lib/mongooseim directory inside the container. In some cases it is desired to keep them while updating the image. In this case the /var/lib/mongooseim dir should be mounted to a host directory. See above example for a reference how to mount a volume.

Docker Pull Command