FROM registry.yandex.net/ubuntu:trusty
VOLUME /tmp
RUN apt-get update && apt-get upgrade -y

RUN apt-get install -y yandex-openjdk11

RUN apt-get install -y locales && apt-get clean

RUN locale-gen en_US en_US.UTF-8
RUN dpkg-reconfigure locales

ENV TZ=Europe/Moscow
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8

ENV JAVA_OPTS="-Dsun.jnu.encoding=UTF-8 -Dprofile.encoding=UTF-8 -Dfile.encoding=UTF-8 -Xmx2G -verbose:gc -Dfile.encoding=UTF-8"

COPY ./mail-scraper-service.jar app.jar
ENTRYPOINT ["java","-jar","/app.jar"]
