# Dockerfile for testing voxtype .deb packages on Debian
# Tests both installation and basic binary execution
#
# Build: docker build -f Dockerfile.debian -t voxtype-test-debian .
# Run:   docker run --rm -v ../releases:/packages voxtype-test-debian

FROM debian:bookworm-slim

# Avoid interactive prompts
ENV DEBIAN_FRONTEND=noninteractive

# Install minimal dependencies for testing
RUN apt-get update && apt-get install -y --no-install-recommends \
    ca-certificates \
    libasound2 \
    && rm -rf /var/lib/apt/lists/*

# Create test user (voxtype needs non-root for some operations)
RUN useradd -m -s /bin/bash testuser

# Copy test script
COPY test-install.sh /test-install.sh
RUN chmod +x /test-install.sh

# Package will be mounted at /packages
VOLUME /packages

ENTRYPOINT ["/test-install.sh"]
CMD ["debian"]
