FROM registry.yandex.net/ubuntu:bionic

ENV DEBIAN_FRONTEND noninteractive

RUN apt-get update
RUN apt-get install -y tzdata \
    && ln -fs /usr/share/zoneinfo/Europe/Moscow /etc/localtime \
    && dpkg-reconfigure -f noninteractive tzdata

RUN mkdir /herschel

COPY build/herschel /herschel/herschel
COPY build/geodata6.bin /herschel/geodata6.bin
COPY build/mlh.bin /herschel/mlh.bin
COPY build/thresholds.json /herschel/thresholds.json
COPY conf /conf
COPY entrypoint.sh /root/entrypoint.sh

WORKDIR /herschel

CMD ["bash", "/root/entrypoint.sh"]
