FROM php:7.2-fpm

LABEL maintainer="Jersson Arrivasplata Rojas <developer@jerssonarrivasplata.com>"

RUN apt-get -o Acquire::Check-Valid-Until=false -o Acquire::Check-Date=false update && apt-get install -y \
  build-essential \
  libpng-dev \
  libjpeg62-turbo-dev \
  libfreetype6-dev \
  locales \
  zip \
  jpegoptim optipng pngquant gifsicle \
  unzip \
  curl \
  git \
  libzip-dev \
  && apt-get clean && rm -rf /var/lib/apt/lists/*

# Install extensions
RUN docker-php-ext-install pdo pdo_mysql mbstring zip exif pcntl
RUN docker-php-ext-configure gd --with-gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --with-png-dir=/usr/include/
RUN docker-php-ext-install gd

# Install Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

# Install Node
RUN curl -sL https://deb.nodesource.com/setup_12.x -o nodesource_setup.sh
RUN apt-get -o Acquire::Check-Valid-Until=false -o Acquire::Check-Date=false update \
  && apt-get install -y \
  nodejs
RUN apt-get install -y sendmail
#RUN npm install -g yarn

#CMD ["bash", "composer global require laravel/installer"]
#docker build  -t "laravel-dockerfile" .
#find / -type d -name "php"

#/usr/local/etc/php
#max_execution_time=300