ARG REGISTRY_URL

FROM ${REGISTRY_URL}/debian:bullseye

COPY . /tmp/collect

RUN bash -e <<EOF

apt-get update

apt-get -y install curl \
    gcc \
    g++ \
    gdb \
    git \
    mariadb-server \
    openssh-server \
    libmariadb3 \
    librrd8 \
    libgnutlsxx28 \
    liblua5.3 \
    python3 \
    python3-dev \
    python3-pip \
    libperl-dev \
    libgcrypt20 \
    aptitude \
    strace \
    locales \
    rrdtool \
    rrdcached \
    zstd \
    psmisc \
    sudo \
    perl-base

apt-get clean

localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8

pip3 install -U robotframework robotframework-databaselibrary robotframework-httpctrl robotframework-examples pymysql python-dateutil psutil
pip3 install grpcio grpcio_tools py-cpuinfo cython unqlite gitpython boto3 robotframework-requests

cd /tmp/collect

.github/scripts/collect-prepare-test-robot.sh mariadb

/bin/rm -rf /tmp/collect

EOF

