FROM python:2.7

# Add the dockerproject repo
RUN apt-get update -y && \
    apt-get install -y apt-transport-https ca-certificates && \
    echo "deb https://apt.dockerproject.org/repo debian-jessie main">/etc/apt/sources.list.d/docker.list && \
    apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D && \
    apt-get update -y && \
    apt-get install -y python-setuptools git python-pip docker-engine && \
    apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

ADD builder.sh /usr/local/bin/builder.sh
ADD ansible-container-inventory.py /etc/ansible/ansible-container-inventory.py
RUN pip install -q --no-cache-dir ansible==2.1.0.0 PyYAML==3.11

