RUN apt-get update -qq
RUN DEBIAN_NONINTERACTIVE=y1 apt-get install -y software-properties-common

{% if REDIS_OSNICK == 'xenial' %}
RUN add-apt-repository ppa:deadsnakes/ppa
RUN add-apt-repository ppa:ubuntu-toolchain-r/test
{% endif %}

RUN apt-get update -qq
RUN DEBIAN_NONINTERACTIVE=1 apt-get install -y curl wget tar git patch  \
	build-essential libcurl4-openssl-dev libssl-dev libatlas-base-dev zlib1g-dev \
    python3.7 python3-pip python3-dev \
    gcc-7 g++-7

RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 60
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 --slave /usr/bin/g++ g++ /usr/bin/g++-7

RUN python3 -m pip install --upgrade pip setuptools wheel

ENV LANG=en_US.UTF-8
RUN apt-get install -y locales && \
    sed -i -e "s/# $LANG.*/$LANG UTF-8/" /etc/locale.gen && \
    dpkg-reconfigure --frontend=noninteractive locales && \
    update-locale LANG=$LANG


