Files
Fichero/fichero_printer/Dockerfile
paul2212 2a7915a707
Some checks failed
Deploy to GitHub Pages / build (push) Has been cancelled
Deploy to GitHub Pages / deploy (push) Has been cancelled
update to 0.1.28
2026-03-16 15:18:57 +01:00

38 lines
1002 B
Docker

ARG BUILD_FROM
FROM $BUILD_FROM
# Install system dependencies.
# build-base is for compiling Python packages (numpy, pillow).
# dbus-dev is for Bleak to communicate with the host's BlueZ.
# Do NOT install bluez here - we use the host BlueZ, not our own.
RUN apk add --no-cache \
bash \
python3 \
py3-pip \
dbus-dev \
build-base \
bluez
# Install Python dependencies from pip.
# We cannot use `pip install .` from pyproject.toml as it's outside the build context.
RUN pip3 install --no-cache-dir --break-system-packages \
"bleak" \
"numpy" \
"Pillow" \
"fastapi" \
"uvicorn[standard]" \
"python-multipart>=0.0.9"
# Copy the application code into the container.
WORKDIR /app
COPY fichero/ /app/fichero/
# Make the 'fichero' package importable.
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"]