git clone GitHub - mattermost/mattermost-docker: Deprecated
cd mattermost-docker
docker-compose build
mkdir -pv ./volumes/app/mattermost/{data,logs,config,plugins,client-plugins}
chown -R 2000:2000 ./volumes/app/mattermost/
docker-compose up -d
But when I go to the host: 502 Bad Gateway
Client:
Version: 18.09.0
API version: 1.39
Go version: go1.10.4
Git commit: 4d60db4
Built: Wed Nov 7 00:57:21 2018
OS/Arch: linux/arm
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 18.09.0
API version: 1.39 (minimum version 1.12)
Go version: go1.10.4
Git commit: 4d60db4
Built: Wed Nov 7 00:17:57 2018
OS/Arch: linux/arm
Experimental: false
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
0984a6898519 mattermostdocker_web “/entrypoint.sh” 2 minutes ago Up 2 minutes (unhealthy) 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp mattermostdocker_web_1
6dee4e5ca3c9 mattermostdocker_db “/entrypoint.sh post…” 2 minutes ago Up 2 minutes (healthy) 5432/tcp mattermostdocker_db_1
a3b6cce8dbf1 mattermostdocker_app “/entrypoint.sh matt…” 2 minutes ago Restarting (2) 37 seconds ago mattermostdocker_app_1
docker logs -f mattermostdocker_app_1
/mattermost/bin/mattermost: line 4: syntax error: unexpected “(”
Using existing config file /mattermost/config/config.json
Configure database connection…OK
Starting mattermost
/mattermost/bin/mattermost: line 1: ELF: not found
/mattermost/bin/mattermost: line 2: @%: not found
/mattermost/bin/mattermost: line 1: ��: not found
/mattermost/bin/mattermost: line 3: ����o���@Z
��@�
�@�@��@��@�@h�
�����@8: not found
/mattermost/bin/mattermost: line 4: syntax error: unexpected “(”
I just tried to build a fresh Mattermost image and it works. I don’t know why your Mattermost binary is not working. Did you add a specific configuration to your docker-compose.yml file ? What is the OS of your computer/server ?
web:
build: web
ports:
- “80:80”
- “443:443”
read_only: true
restart: unless-stopped
volumes:
# This directory must have cert files if you want to enable SSL
- ./volumes/web/cert:/cert:ro
- /etc/localtime:/etc/localtime:ro
# Uncomment for SSL
# environment:
# - MATTERMOST_ENABLE_SSL=true
Ok, nothing special. I don’t know, maybe someone who know better the way Mattermost binary is build could help. But I am not able to reproduce and this error does not mean anything to me.
Oh I get it ! Someone came on Github with a similar issue, because he is using a Raspberry PI. I noticed that you are using an ARM version of Docker, so I assume you are running on an ARM device. The Mattermost Docker image is using the AMD64 binary.
I’m not sure Mattermost is working on ARM, maybe someone from the development team could answer on this.
Raspbian is 32-bit, at present. If you want a 64-bit OS on a Raspberry Pi, try BalenaOS instead. It’s especially suited to running 64-bit docker containers on the Raspberry Pi.
Unfortunately the difference in architecture between ARM and x86 is bigger than the memory address length (32 or 64 bit). You could try to cross-compile Mattermost for ARM, theoretically, but it’s not something that is supported, so I have no idea if that’s something that would succeed or not. With BalenaOS or not, however, you will not be able to execute the regular Mattermost binary.