FROM registry.yandex.net/mail/mail-trusty-common:latest

RUN apt-get update -qq && apt-get install nginx=1.12.2-1.yandex.18

ENV PGPASSFILE "/etc/yamail/.pgpass"
ENV PGSSLROOTCERT "/etc/yamail/pgca.pem"
ENV YT_TOKEN_PATH "/etc/yt/token"

COPY usr /usr
COPY deploy /

RUN chmod -R 644 /etc/cron.d

CMD ["/opt/entrypoint.sh"]
