FROM registry.yandex.net/ubuntu:trusty
MAINTAINER Anton Grigoryev <griganton@yandex-team.ru>

ENV WORKDIR /advisor-notifier
ENV FLASK_APP app.py
WORKDIR $WORKDIR

# NOTE: there are issues with pip upgrade and this workaround have been
# proposed here: https://github.com/moby/moby/issues/12327#issuecomment-171496303
RUN apt-get update && apt-get install python-pip -y --force-yes && pip install --upgrade pip
RUN pip install setuptools
RUN pip install --index-url https://pypi.yandex-team.ru/simple/ Flask==0.12.2 requests==2.18.4 ylog==0.47

# Copy the current directory contents into the container
COPY src .

CMD ["flask", "run", "-h", "::", "-p", "80"]
