FROM php:7.4-alpine

ARG PHP_TIMEZONE

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

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"

WORKDIR /usr/src/myapp

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

ENV COMPOSER_HOME /tmp
