FROM ubuntu:20.04
ENV DEBIAN_FRONTEND noninteractive

RUN apt-get -y update \
    && apt-get -y install --no-install-recommends curl gnupg2 ca-certificates \
    && printf 'deb http://archive.nic.cz/ubuntu focal main\n' > /etc/apt/sources.list.d/cz.nic.list \
    && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E6DD3CAC7844804C

RUN apt-get -y update                       \
        && apt-get -y install --no-install-recommends \
            ssh-client                      \
            cmake                           \
            pkg-config                      \
            build-essential                 \
            ninja-build                     \
            bash-completion                 \
            git                             \
            libboost-system-dev             \
            libboost-date-time-dev          \
            libgrpc++1                      \
            libgrpc++-dev                   \
            libprotobuf-dev                 \
            libprotobuf17                   \
            protobuf-compiler               \
            protobuf-compiler-grpc          \
            python3-pip                     \
        && apt-get -y clean                 \
        && rm -rf /var/lib/apt/lists/*

RUN pip3 install grpcio grpcio-tools
