kiwix / kiwix-tools

Command line Kiwix tools: kiwix-serve, kiwix-manage, ...
https://download.kiwix.org/release/kiwix-tools/
GNU General Public License v3.0
433 stars 85 forks source link

Fixed docker image for non-amd64 platforms #515

Closed rgaudin closed 2 years ago

rgaudin commented 2 years ago

PR#489 (01430603b689bdb213acd7cf6eaa712173dea59f) introduced dumb-init for better signals handling. While this has the intended effect, it was done ny downloading the dumb-init static bin into the image… only using the amd64 version.

Ever since, the image(s) have been broken for armv7 and arm64.

As dumb-init doesn't provide 32b arm binary and because it's such a simple/small code, this fix compiles it in a builder shallow image ; ensuring we're getting an appropriate binary for the target arch.

We are also statically linking against musl-C as this is supported by dumb-init and is much smaller than glibc.