# Runs host/lgtv-audiocap-receiver.py as a container instead of a systemd
# unit — for setups (e.g. Unraid) where Docker is the native way to run
# anything, but the ALSA loopback itself still has to be loaded on the real
# host kernel first (see unraid/lgtv-audiocap-loopback.plg or
# host/install-loopback.sh --method alsa, whichever fits the host).
#
# Build from the repo root, not this directory, so the image always tracks
# the same receiver the systemd install path uses — no second copy to drift:
#   docker build -f docker/Dockerfile -t lgtv-audiocap-receiver .
FROM alpine:3.20

RUN apk add --no-cache python3 alsa-utils

COPY host/lgtv-audiocap-receiver.py /usr/local/bin/lgtv-audiocap-receiver.py
COPY docker/entrypoint.sh /entrypoint.sh
RUN chmod +x /usr/local/bin/lgtv-audiocap-receiver.py /entrypoint.sh

EXPOSE 5004/udp

ENTRYPOINT ["/entrypoint.sh"]
