FROM php:7.4
ARG APP_TIMEZONE=Europe/Moscow
ENV APP_TIMEZONE ${APP_TIMEZONE}
RUN ln -snf /usr/share/zoneinfo/${APP_TIMEZONE} /etc/localtime
RUN apt-get update && apt-get install -y libpng-dev apt-utils
RUN curl -sL
https://deb.nodesource.com/setup_12.x | bash -
RUN apt-get install -y nodejs
RUN npm install -g webpack-cli cross-env
ADD
https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
RUN chmod +x /usr/local/bin/install-php-extensions && sync && \
install-php-extensions bcmath opcache sockets gd zip xsl soap pdo_pgsql pgsql imagick mcrypt
RUN curl -sS
https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
COPY . /var/www/
WORKDIR /var/www/
RUN composer install \
--ignore-platform-reqs \
--no-interaction \
--no-plugins \
--no-scripts \
--prefer-dist
RUN npm install
RUN npm run dev
RUN rm -rf node_modules html
RUN php artistan migrate --seed
CMD ["/bin/bash"]