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 /resharder \
    && mkdir /resharder/tvm_cache

COPY build/resharder /resharder/resharder
COPY build/geodata6.bin /geodata6.bin
COPY conf /conf
COPY entrypoint.sh /root/entrypoint.sh

WORKDIR /resharder

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