FROM php:apache-buster COPY . /app COPY ./apache-host.conf /etc/apache2/conf-enabled/project.conf WORKDIR /app RUN a2enmod rewrite RUN apt-get update && \ apt-get install -y libzip-dev && \ docker-php-ext-install zip && \ docker-php-ext-install pdo pdo_mysql && \ apt-get install -y curl dirmngr apt-transport-https lsb-release ca-certificates && \ curl -sL https://deb.nodesource.com/setup_12.x | bash - && \ apt-get install -y nodejs && \ rm -rf /var/lib/apt/lists/* RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \ php composer-setup.php && \ php -r "unlink('composer-setup.php');" && \ ./composer.phar install --no-dev RUN npm install --global yarn && \ yarn && \ yarn prod && \ rm -rf node_modules/ RUN find storage -type d -exec chmod 777 {} \; && \ find storage -type f -exec chmod 666 {} \; \