From 0044f73d7a96fa84124efea9d43eb396b1084bda Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Mon, 21 Feb 2022 21:11:10 -0600 Subject: [PATCH] armv7 compatibility --- docker/Dockerfile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docker/Dockerfile b/docker/Dockerfile index ee988a2a2..a993ce002 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -9,6 +9,7 @@ COPY web/ . RUN npm install && npm run build FROM debian:11 as wheels +ARG TARGETARCH ENV DEBIAN_FRONTEND=noninteractive @@ -38,6 +39,11 @@ RUN apt-get -qq update \ RUN wget -q https://bootstrap.pypa.io/get-pip.py -O get-pip.py \ && python3 get-pip.py "pip" +RUN if [ "${TARGETARCH}" = "arm" ]; \ + then echo "[global]" > /etc/pip.conf \ + && echo "extra-index-url=https://www.piwheels.org/simple" >> /etc/pip.conf; \ + fi + COPY requirements.txt /requirements.txt RUN pip3 install -r requirements.txt @@ -108,6 +114,7 @@ COPY docker/rootfs/ / # s6-overlay RUN S6_ARCH="${TARGETARCH}" \ && if [ "${TARGETARCH}" = "amd64" ]; then S6_ARCH="amd64"; fi \ + && if [ "${TARGETARCH}" = "arm" ]; then S6_ARCH="armhf"; fi \ && if [ "${TARGETARCH}" = "arm64" ]; then S6_ARCH="aarch64"; fi \ && wget -O /tmp/s6-overlay-installer "https://github.com/just-containers/s6-overlay/releases/download/v2.2.0.3/s6-overlay-${S6_ARCH}-installer" \ && chmod +x /tmp/s6-overlay-installer && /tmp/s6-overlay-installer /