mirror of
https://github.com/kiwix/kiwix-tools.git
synced 2025-08-03 11:25:59 -04:00
support arm arch for kiwix-serve image
This commit is contained in:
parent
b2c68d7f22
commit
8cc34782bc
@ -1,10 +1,17 @@
|
||||
FROM alpine:latest
|
||||
# declare build option ARCH
|
||||
ARG ARCH=
|
||||
# download ARCH-specific base image if specified
|
||||
FROM ${ARCH}alpine:3
|
||||
# decide which kiwix arch to download later (`armhf` for all arm* and x86_64 otherwise)
|
||||
ARG ARCH
|
||||
RUN if [ $(echo $ARCH | cut -c 1-3) = "arm" ] ; then echo "armhf" > /etc/kiwix_arch ; else echo "x86_64" > /etc/kiwix_arch ; fi
|
||||
LABEL maintainer Emmanuel Engelhart <kelson@kiwix.org>
|
||||
|
||||
# Install kiwix-serve
|
||||
ARG RELEASE_ARCH="x86_64"
|
||||
WORKDIR /
|
||||
RUN apk add --no-cache curl bzip2
|
||||
RUN curl -kL https://download.kiwix.org/release/kiwix-tools/kiwix-tools_linux-x86_64.tar.gz | tar -xz && \
|
||||
RUN curl -kL https://download.kiwix.org/release/kiwix-tools/kiwix-tools_linux-$(cat /etc/kiwix_arch).tar.gz | tar -xz && \
|
||||
mv kiwix-tools*/kiwix-serve /usr/local/bin && \
|
||||
rm -r kiwix-tools*
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user