Mattermost in a container

Mattermost is an open source, self-hosted Slack-alternative. As an alternative to proprietary software-as-a-service messaging, Mattermost brings all your team communication into one place, making it searchable and accessible anywhere.

It’s the next big thing after IRC, trust me! ;)

I have put the mattermost binary, some basic configuration and an entrypoint into a container. This way you can give it a quick try on any platform that is able to run docker container images.


I have developed and tested using Fedora 23, the work I have done is in the transition into upstream Fedora-Dockerfiles.

The matterost container will look for a MySQL database provided at the hostname mysql, so you need to link to a mysql when running mattermost.


Get the Dockerfile at configure and build the image.


Review the file config.json carefully and adopt it to your needs, it will be put inside of the container image.


Just a simple docker build --rm --tag mattermost . will do it.


Start a MySQL container first, mattermost will need it:

docker run --detach \
 --name mysql \
 -e MYSQL_USER=mmuser \
 -e MYSQL_PASSWORD=mostest \
 -e MYSQL_DATABASE=mattermost_test

This will use a mariadb from user container. User, password and database must match what you put in config.json.

Now run the mattermost container itself and link it to the mysql container:

docker run --detach \
 --name mattermost \
 --publish 8065:8065 \
 --link db:mysql \


Point your browser at localhost:8065, the first user you create will be an Administrator of mattermost.


This is a super easy way to quickly deploy and test mattermost. You should probably have a look at the smtp settings within config.json to make the test more useful.

Wrapping this work up in an Atomic App will be an next step, and give you an easy one step an stall a la atomic run mattermost-atomicapp. I am looking forward to that!