Files
Fichero/fichero_printer/Dockerfile
Tobias Leuschner e723b07fcd
Some checks failed
Deploy to GitHub Pages / build (push) Has been cancelled
Deploy to GitHub Pages / deploy (push) Has been cancelled
fix: use amd64-base:latest with py3-numpy/py3-pillow from apk, no compiler needed
2026-03-07 12:13:00 +01:00

33 lines
798 B
Docker

ARG BUILD_FROM
FROM $BUILD_FROM
# 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
# Pure-Python packages only (no compilation required)
RUN pip3 install --no-cache-dir --break-system-packages \
"bleak>=0.21" \
"fastapi>=0.111" \
"uvicorn[standard]>=0.29" \
"python-multipart>=0.0.9"
# Copy the fichero Python package into the container
WORKDIR /app
COPY fichero/ /app/fichero/
# Make the package importable without installation
ENV PYTHONPATH=/app
# Copy startup script and normalise line endings (Windows CRLF -> LF)
COPY run.sh /usr/bin/run.sh
RUN sed -i 's/\r//' /usr/bin/run.sh && chmod +x /usr/bin/run.sh
CMD ["/usr/bin/run.sh"]