diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2023-05-30 15:47:40 +0200 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2023-05-30 16:10:58 +0200 |
commit | 8c5834c297ce836bf0ad2fd18407654ae614c946 (patch) | |
tree | 0bddda1f0e824367ace4d2758c2d7e55a51f109d /docker/Dockerfile | |
parent | docker/frontend: update the CSS from upstream (diff) | |
download | cgitize-4.0.12.tar.gz cgitize-4.0.12.zip |
docker: fix armhf buildsv4.0.12
Diffstat (limited to '')
-rw-r--r-- | docker/Dockerfile | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile index 18bffde..46a2215 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,9 +1,28 @@ FROM python:3.11-alpine AS base -FROM base AS build +FROM base AS deps RUN apk add -q --no-cache gcc libffi-dev make musl-dev +FROM deps as deps-amd64 +FROM deps as deps-arm64 + +FROM deps as deps-arm + +# The cryptography package doesn't distribute pre-built binaries for this +# platform, which is why it's built manually (and requires extra dependencies). +RUN apk add -q --no-cache cargo git openssl-dev rust + +# Unless this is set, cargo build fails with out of memory errors for some +# reason. Reference: +# +# https://github.com/docker/buildx/issues/359#issuecomment-1331443419 +# +# This is also the reason to install git as a build dependency. +ENV CARGO_NET_GIT_FETCH_WITH_CLI=true + +FROM deps-$TARGETARCH as build + COPY ["requirements.txt", "/tmp/"] RUN pip3 install -q --no-cache-dir --target=/deps -r /tmp/requirements.txt |