MariaDB / mariadb-docker

Docker Official Image packaging for MariaDB
https://mariadb.org
GNU General Public License v2.0
770 stars 438 forks source link

Enable ARMv7 support #328

Closed awehrfritz closed 3 years ago

awehrfritz commented 4 years ago

When deploying the mariadb image on a ARMv7 SOC (running Armbian), I get the following error:

ERROR: no matching manifest for linux/arm/v7 in the manifest list entries

I suppose that's because ARMv7 isn't among the supported architectures. Would it be possible to provide support for this?

tianon commented 3 years ago

See #125, #204, especially: :disappointed:

We can only build for architectures that MariaDB supports and provides binaries for, which is the reason for our current supported architectures list.

awehrfritz commented 3 years ago

OK, thanks for the heads up.

soletan commented 2 years ago

If you happen to stumble over this issue and prefer having any version of MariaDB e.g. with Docker on a Raspberry Pi, just stick to the version that comes included with Ubuntu focal which is used here (though debian:latest comes with a more recent version). Proceed like this on your RPi:

  1. Check version avalable in container:
    • docker run -it --rm ubuntu:focal
    • apt update
    • apt-cache madison mariadb-server This will list versions available in Ubuntu focal containers, e.g. 1:10.3.34-0ubuntu0.20.04.1
  2. Leave that container, grab a copy of this repo's subfolder matching discovered minor version, e.g. 10.3 in given example.
  3. Adjust Dockerfile of grabbed folder and replace version named there (somewhere around line 85) with the one listed by apt-cache.
  4. Now build the mariadb container locally yourself, by running this from within that grabbed folder: docker build -t mariadb ..

You might be able to do the same based on debian image which currently comes with 10.5. But remember to fix at least the FROM statement at the beginning of Dockerfile, too. Maybe, the Dockerfile is too specific and thus needs additional revisions, though. Haven't tested that myself ...

grooverdan commented 2 years ago

Note current release of 10.8+ will be ubuntu:jammy which has MariaDB-10.6 which seems to be supporting the armhf name of arm32v7.

Because all the repo and version are build args, the build example below (from current next branch) builds:

 buildah bud --tag m106arm32v7 \
      --build-arg MARIADB_MAJOR=10.6 \
      --build-arg MARIADB_VERSION=1:10.6.7-2ubuntu1 \
      --build-arg REPOSITORY="http://ports.ubuntu.com/ubuntu-ports/ jammy main" \
     --arch arm \
    10.8

Note: --arch riscv64 works in the same way.

Note per the FAQ, that there is no armv7 tested by MariaDB developers before release, only the very thin (994 basic tests out of thousands) set of tests in the ubuntu package build log.