FROM debian:12
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get -y update && apt-get install -y --no-install-recommends curl gnupg2 ca-certificates
RUN printf 'deb [trusted=yes] http://archive.nic.cz/scratch bookworm main\n' > /etc/apt/sources.list.d/cz.nic.list

RUN apt-get -y update                   \
    && apt-get -y install --no-install-recommends \
        ssh-client                      \
        cmake                           \
        postgresql-server-dev-15        \
        pkg-config                      \
        build-essential                 \
        ninja-build                     \
        bash-completion                 \
        git                             \
        libpq-dev                       \
        libmpdec-dev                    \
        libssh-dev                      \
        libidn11-dev                    \
        libboost-date-time-dev          \
        libboost-filesystem-dev         \
        libboost-program-options-dev    \
        libboost-random-dev             \
        libboost-regex-dev              \
        libboost-serialization-dev      \
        libboost-system-dev             \
        libboost-test-dev               \
        libboost-thread-dev             \
        libgrpc++-dev                   \
        libprotobuf-dev                 \
        protobuf-compiler               \
        protobuf-compiler-grpc          \
        python3-pip                     \
        pipx                            \
    && apt-get -y clean                 \
    && rm -rf /var/lib/apt/lists/*

RUN pipx install grpcio-tools
