FROM debian:bookworm-slim

RUN apt-get update \
    && apt-get install -y --no-install-recommends inspircd \
    && rm -rf /var/lib/apt/lists/* \
    && mkdir -p /var/run/inspircd \
    && chown irc:irc /var/run/inspircd

EXPOSE 6697 7000

USER irc

CMD ["/usr/sbin/inspircd", "--nofork"]
