ARG BUILD_FROM FROM $BUILD_FROM # Install Bluetooth system libraries (BlueZ for BLE/RFCOMM) RUN apk add --no-cache \ bluez \ bluez-deprecated \ dbus # Install Python runtime dependencies 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" # Copy the fichero Python package into the container WORKDIR /app COPY fichero/ /app/fichero/ # Make the package importable without installation ENV PYTHONPATH=/app # Copy and register the startup script COPY run.sh /usr/bin/run.sh RUN chmod +x /usr/bin/run.sh CMD ["/usr/bin/run.sh"]