FROM php:5.6-alpine

ARG PHP_TIMEZONE

RUN apk --no-cache add curl openssh openssl bash zlib-dev

RUN echo "memory_limit=-1" > "$PHP_INI_DIR/conf.d/memory-limit.ini" \
 && echo "date.timezone=${PHP_TIMEZONE:-UTC}" > "$PHP_INI_DIR/conf.d/date_timezone.ini"

RUN docker-php-ext-install zip

WORKDIR /usr/src/myapp

RUN curl -s https://raw.githubusercontent.com/composer/getcomposer.org/c1ad3667731e9c5c1a21e5835c7e6a7eedc2e1fe/web/installer | php -- --install-dir=/usr/bin --quiet

ENV COMPOSER_HOME /tmp
