FROM python:{{.Version}}

RUN apt-get update -qq && apt-get install -y build-essential {{.Packages.ToList " "}}

ENV APP_HOME /app
RUN mkdir $APP_HOME
WORKDIR $APP_HOME

ADD {{.RequirementsTxt}} $APP_HOME/
RUN pip install --no-cache-dir -r {{.RequirementsTxt}}

ADD . $APP_HOME