FROM alpine:latest

RUN apk add gcc g++ cmake ninja
RUN apk add mpg123-dev openssl-dev alsa-lib alsa-utils portaudio-dev pulseaudio-alsa alsa-plugins-pulse pulseaudio pulseaudio-utils

RUN echo "pcm.!default pulse\nctl.!default pulse" > /root/.asoundrc

WORKDIR /app
COPY . /app

RUN cmake -S . -B build -G Ninja
RUN cmake --build build

CMD ["build/M2-PT-DRP"]
