FROM vulhub/php:5.6-apache

LABEL maintainer="phithon <root@leavesongs.com>"

COPY www/* /var/www/html/

RUN set -ex \
    && rm /etc/apt/sources.list \
    && echo "deb [trusted=yes] http://archive.debian.org/debian-security jessie/updates main" >> /etc/apt/sources.list.d/jessie.list \
    && echo "deb [trusted=yes] http://archive.debian.org/debian jessie main" >> /etc/apt/sources.list.d/jessie.list \
    && apt-get update \
    && apt-get install -y --no-install-recommends git \
    && cd /var/www/html/ \
    && curl -sSL https://getcomposer.org/installer | php \
    && php composer.phar install \
    && rm -rf /var/lib/apt/lists/*
