diff --git a/fichero_printer/Dockerfile b/fichero_printer/Dockerfile index 41a8c8e..1c243d3 100644 --- a/fichero_printer/Dockerfile +++ b/fichero_printer/Dockerfile @@ -1,28 +1,23 @@ ARG BUILD_FROM FROM $BUILD_FROM -# BlueZ for BLE/RFCOMM + build tools for packages without binary wheels +# Python 3, BlueZ and pre-compiled Alpine packages (no C compiler needed) RUN apk add --no-cache \ bash \ + python3 \ + py3-pip \ + py3-numpy \ + py3-pillow \ bluez \ - dbus \ - gcc \ - musl-dev \ - libjpeg-turbo-dev \ - zlib-dev + dbus -# Install Python runtime dependencies -RUN pip install --no-cache-dir \ +# Pure-Python packages only (no compilation required) +RUN pip3 install --no-cache-dir --break-system-packages \ "bleak>=0.21" \ - "numpy" \ - "pillow" \ "fastapi>=0.111" \ "uvicorn[standard]>=0.29" \ "python-multipart>=0.0.9" -# Remove build-only packages to keep the image slim -RUN apk del gcc musl-dev - # Copy the fichero Python package into the container WORKDIR /app COPY fichero/ /app/fichero/ diff --git a/fichero_printer/build.yaml b/fichero_printer/build.yaml index 305711b..48722ec 100644 --- a/fichero_printer/build.yaml +++ b/fichero_printer/build.yaml @@ -1,6 +1,6 @@ build_from: - aarch64: "python:3.12-alpine3.21" - amd64: "python:3.12-alpine3.21" - armhf: "python:3.12-alpine3.21" - armv7: "python:3.12-alpine3.21" - i386: "python:3.12-alpine3.21" + aarch64: "ghcr.io/home-assistant/aarch64-base:latest" + amd64: "ghcr.io/home-assistant/amd64-base:latest" + armhf: "ghcr.io/home-assistant/armhf-base:latest" + armv7: "ghcr.io/home-assistant/armv7-base:latest" + i386: "ghcr.io/home-assistant/i386-base:latest"