FROM alpine:3.20.1

RUN apk add --no-cache git meson alpine-sdk cmake linux-headers python3 python3-dev \
    py3-yaml py3-jinja2 py3-ply py3-pybind11 py3-pybind11-dev py3-paho-mqtt

WORKDIR /libcamera
ADD libcamera /libcamera
RUN meson setup --prefix /usr build && ninja -C build install

RUN apk add --no-cache py3-pillow

WORKDIR /app
COPY mfb.py /app
COPY spider-cam.py /app

CMD ["python3", "spider-cam.py"]
