FROM ubuntu:20.04

RUN apt-get update \
  && apt-get install -y software-properties-common \
  && apt-get install apt-transport-https

# Add Yandex dist
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 7FCD11186050CD1A && \
    add-apt-repository 'deb http://dist.yandex.ru/common    stable/all/' && \
    apt-get update

# Install Osquery
RUN apt-get install osquery-vanilla && \
    apt-get install -y osquery-yandex-generic-config

# Script that moves all staff to host
COPY prepare.sh /opt/osquery/
RUN chmod +x /opt/osquery/prepare.sh

# Install fim
RUN . /etc/osquery/scripts/startup/60_ycloud_fim.sh && use_ycloud_fim
