I’ve taken a look at the mattermost server build process. It’s very docker-centric at present. Please see my detailed comments here.
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).
In order to create a snap, the builds which are published unofficially (by SmartHoneyBee, a very helpful person), and get mentioned here (see step 1 there) are actually the best starting point, as they are “docker-free”.
You’ll definitely also want to look at SmartHoneyBee’s TravisCI configs, which autogenerate the docker-free builds.