Raspberry Pi 4, Mattermost inside Docker?

First Post. :slight_smile:

Has anyone tinkered with getting Mattermost working on a Raspberry Pi 4? Doing a normal Docker install of Mattermost? I’m guessing that running from an SSD, in a SATA-to-USB3 enclosure (~~200ish MB/sec) would be smart, to get far faster disk I/O than what can be had on a MicroSD card (~20ish MB/sec).

Are there any obvious ARM-related bugs which can and will happen in Mattermost, or any of it’s dependencies, which do not happen on AMD64?

Hi @esbeeb,

I have never run Mattermost on something else than good ol’ Intel and AMD chips, but there is a project on Github which builds the Mattermost team edition for different architectures and OSs.

You can find it at https://github.com/SmartHoneybee/ubiquitous-memory

1 Like

A couple of notable developments:
“Balena releases first fully functional 64-bit OS for the Raspberry Pi 4”:

This might be the best way at present to run Mattermost in a Docker container, on a RPi 4 SBC.

Also, the Raspberry Pi Engineers themselves are working hard, to add a 64-bit Linux kernel to Raspbian, then later will follow all 64-bit userland software:

The official installation instructions for Mattermost are not helpful, at present, if you are on a different architecture than AMD64 (since they distribute no other pre-compiled installation .tar.gz, besides for AMD64). There also aren’t really any build instructions to speak of. What they do provide is advice on how do become a developer, and set up a development environment (where building is part of the process). For sysadmins merely seeking to install (but not develop) on a Raspberry Pi 4, the Mattermost documentation seems to almost painstakingly sneak around divulging any straightforward (non-docker) method to compile and install, from source code.

If one tries to build Mattermost within Raspbian 32-bit (armv7l), one will run into plenty of trouble. The trouble includes, but is not limited to the following:

  • At present, there is no docker image for mysql for the armv7l architecture. But the build system aggressively assumes there will be one. (Note, there is talk about a docker image for mysql, for 64-bit ARM, as in aarch64, but it’s slow in coming. See here. This bodes badly for building mattermost on any 64-bit OS for the Raspberry Pi 4, such as Ubuntu 18.04, or BalenaOS as well. This mysql docker image dependency in the build system will be the “achilles heel” each time). :flushed:

  • The Debian package “dh-autoreconf” needs to be installed before trying to “npm install image-webpack-loader”.

  • Also, Node.js version 12, not 10, will be required, because there are a few npm modules which won’t install properly in Node v10 on armv7l, but will install properly on Node v12, on armv7l. These problematic modules are node-sass, gifsicle, and image-webpack-loader (which tries to pull in mozjpeg, which is where the failure is).

  • when you do a “make build-linux” in ~/mattermost-server, guess which architecture it tries to build for. armv7l? No! AMD64! :dizzy_face: It’s like the twilight zone of compiling from source.

So in summary, the build system heavily assumes the AMD64 architecture, even when you download the source yourself, and try to make/build/compile/install/whatever it on armv7l. The build system would require heavy re-architecting to come out of this AMD64 assumption. It also doesn’t accommodate those who would prefer to not use docker (and thereby save about 3GB of RAM during the build process).

The build system also doesn’t seem to accommodate the use of postgres (instead of mysql) for building with docker. Postgres supports arm64v8, arm32v7 and arm32v6, for its docker images. For this reason, and others, I would sure like to have postgres be the default, go-to database instead!

PS: To install Mattermost on a Raspberry Pi 4, the most straightforward, docker-avoiding pathway is probably to use Arch Linux, or an Arch-derivative, like Manjaro. There is a Mattermost AUR package, where a refreshingly old-school, docker-avoiding, alternative-to-AMD64-arch-friendly Makefile has been written, and is maintained. See here, for more details. :pensive:

I’ve changed my mind. These instructions are a bit outdated (at present), but are awesome, and were just what I was looking for!! :grinning:

1 Like

By the way, MariaDB, which is pretty much a drop in replacement for MySQL, does make an ARM64 docker image (and MySQL doesn’t). If the build system/documentation were to elect to use MariaDB instead, this would open up the door to installing Mattermost, by way of Docker, on Ubuntu 18.04 64-bit for the Raspberry Pi 4.

Note: I use MariaDB on my own Raspberry Pi 4 just fine, with Mattermost.