FROM debian:trixie-slim

RUN apt-get update && apt-get install --yes \
    net-tools \
    netbase \
    netcat-openbsd \
    supervisor \
    && rm -rf /var/lib/apt/lists/*

COPY ixagent-*.deb /tmp/.

RUN apt-get update && \
    apt-get install --yes /tmp/ixagent-*.deb && \
    rm -rf /var/lib/apt/lists/*

# Expose Plain-text TCP port.
EXPOSE 9230/tcp

# Copy files.
COPY ./etc/supervisor/supervisor.conf /etc/supervisor/supervisor.conf
COPY ./entrypoint.sh /usr/bin/entrypoint.sh

# Setup container and start services.
ENTRYPOINT [ "/usr/bin/entrypoint.sh" ]
