From 1b0f5e92f14a84dbcb55209e51bc3857e414a57e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C4=93teris=20Caune?= Date: Tue, 12 Oct 2021 22:40:11 +0300 Subject: [PATCH] Update Dockerfile to use the piwheels.org repo on armhf cc: #565, #568 --- .github/workflows/publish_docker_image.yml | 2 +- docker/Dockerfile | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish_docker_image.yml b/.github/workflows/publish_docker_image.yml index 95b8a2db..37259e81 100644 --- a/.github/workflows/publish_docker_image.yml +++ b/.github/workflows/publish_docker_image.yml @@ -36,7 +36,7 @@ jobs: with: context: . file: docker/Dockerfile - platforms: linux/amd64,linux/arm64/v8 + platforms: linux/amd64,linux/arm/v7,linux/arm64/v8 push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/docker/Dockerfile b/docker/Dockerfile index b706151e..be4b3c83 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,10 +1,12 @@ FROM python:3.9-slim-buster as builder COPY requirements.txt /tmp -RUN \ - apt update && \ - apt install -y build-essential cargo libffi-dev libpq-dev libssl-dev python3-dev +RUN apt update && apt install -y build-essential libpq-dev +RUN \ + if [ `dpkg --print-architecture` = "armhf" ]; then \ + printf "[global]\nextra-index-url=https://www.piwheels.org/simple\n" > /etc/pip.conf ; \ + fi RUN pip wheel --wheel-dir /wheels -r /tmp/requirements.txt RUN pip wheel --wheel-dir /wheels uwsgi