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
#RUN apk add --no-cache libcamera libcamera-tools libcamera-v4l2 python3 python3-dev \
#    cython py3-setuptools alpine-sdk ffmpeg ffmpeg-dev

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

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

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