ARG PHP_HASH_TAG=':8.1-apache'
FROM php${PHP_HASH_TAG}

ARG MYSQl_HOST="timesql-db"
ARG MYSQL_DATABASE="timesql-db"
ARG MYSQL_USER="timesql-usr"
ARG MYSQL_PASSWORD="timesqlpwd"
ARG MYSQL_ROOT_PASSWORD="timesqlpwd"

ENV MYSQL_HOST=$MYSQl_HOST
ENV MYSQL_DATABASE=$MYSQL_DATABASE
ENV MYSQL_USER=$MYSQL_USER
ENV MYSQL_PASSWORD=$MYSQL_PASSWORD
ENV MYSQL_ROOT_PASSWORD=$MYSQL_ROOT_PASSWORD

RUN docker-php-ext-install mysqli

EXPOSE 80


ENTRYPOINT ["apache2-foreground"]
