nginx-proxy-manager: jc21/mariadb-aria:10.4 database fails on ARM architecture (workaround)
Summary
Using the latest setup instructions on the NPM website, the jc21/mariadb-aria:10.4 image fails on Raspberry Pi OS (EDIT: just realised this was with a Pi running Ubuntu Server, regardless, ARM architecture) (5.4.0-1013-raspi) with a exec user process caused "exec format error"
in the Docker log.
To reproduce
- Have a Raspberry Pi using
Raspberry Pi OSUbuntu Server (5.4.0-1013-raspi) or potentially any distro. - Create a docker-compose.yml and config.json using the setup guide on the npm website.
- Deploy using
docker-compose up -d
.
Result
The stack doesn’t load correctly, with errors showing in both the database and app services. Critically, the database service does not allow docker exec -it <container> bash
entry, stating that it is currently restarting, and displaying exec user process caused "exec format error"
within the log entry for the database container.
Potential Cause
On investigation, this may be due to an incompatibility with ARM architecture and the jc21/mariadb-aria:10.4 database image, despite the suggestion in the install documentation stating otherwise.
Workaround
I solved this by replacing the jc21/mariadb-aria:10.4
image with webhippie/mariadb:latest
.
The webhippie image requires the MYSQL
environment variables to be replaced with MARIADB
. The updated docker-compose.yml
is as follows:
version: "3"
services:
app:
image: jc21/nginx-proxy-manager:2
restart: always
ports:
# Public HTTP Port:
- '80:80'
# Public HTTPS Port:
- '443:443'
# Admin Web Port:
- '81:81'
environment:
# Uncomment this if IPv6 is not enabled on your host
# DISABLE_IPV6: 'true'
volumes:
# Make sure this config.json file exists as per instructions above:
- ./config.json:/app/config/production.json
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
depends_on:
- db
db:
image: webhippie/mariadb:latest
restart: always
environment:
MARIADB_ROOT_PASSWORD: 'npm'
MARIADB_DATABASE: 'npm'
MARIADB_USERNAME: 'npm'
MARIADB_PASSWORD: 'npm'
volumes:
- ./data/mysql:/var/lib/mysql
Additional Information
This was tested using both standard command line docker-compose and Portainer stack deployment. The error existed with deployment on both systems, and was solved using the above workaround on both systems.
I haven’t tested this solution for very long, but the containers appear to be stable, I am able to log into the NPM interface and I have been able to enter host entries. I will update if this solution doesn’t work for any reason.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 5
- Comments: 18 (1 by maintainers)
Related open/closed issues on this repo: #458 #446 #310 #298 #269 #483
While some of these issues are closed, I don’t believe they have been solved: the currently outlined NPM website instructions in both the quick and full setup guides suggest a broken image for ARM systems. The closed issues were solved by replacing
jc21/mariadb-aria:10.4
in the docker-compose.yml with an alternate mariadb image, either:While these both appear to be valid workarounds, I proposed that the issue is not fixed as the documentation should reflect a working solution.
Just to add to this for anyone else reading. I used the linuxserver/mariadb:latest image which worked for me. Running this on an Odroid-C2 Debian Stretch, which is arm64v8, I believe.
I couldn’t get it to work with the webhippie mariadb container. Here’s what worked for me:
There is another issue on Rpi3 - error Config file /app/config/production.json cannot be read. Error code is: EISDIR. Error message is: EISDIR: illegal operation on a directory, read Error: Config file /app/config/production.json cannot be read. Error
The resolution is if you have the config.json - in wong location it will create as directory. This config.json must be on the location where the config is pointing in dcoker-compose.yaml.
ex: copy the config.json to this location : ./volumes/proxy_manager/config.json