Skip to content

Commit

Permalink
Add dependencies for building package cffi
Browse files Browse the repository at this point in the history
This fails on armv6 and armv7 builds, probably because certain packages
no longer come prebuilt for those targets; we really need to build them
ourselves.

See also: https://cryptography.io/en/latest/installation/
  • Loading branch information
antonijn committed Feb 10, 2024
1 parent 2af2e4c commit 13f0b67
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Expand Down
14 changes: 13 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
FROM python:3.12-slim
WORKDIR /app
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt

# The tmpfs mount is a workaround
# https://github.com/rust-lang/cargo/issues/8719
RUN --mount=type=tmpfs,target=/root/.cargo \
apt-get update \
&& apt-get install --yes --no-install-recommends \
build-essential libssl-dev libffi-dev cargo pkg-config \
&& pip install --no-cache-dir -r requirements.txt \
&& apt-get autoremove --purge --yes \
build-essential libssl-dev libffi-dev cargo pkg-config \
&& apt-get clean \
&& rm -rf /root/.cache

COPY . .
ARG VERSION_TAG=unknown
ENV MQTT4DSMR_VERSION=$VERSION_TAG
Expand Down

0 comments on commit 13f0b67

Please sign in to comment.