FROM php:7.1.3 RUN apt-get update -y && apt-get install -y openssl zip unzip git zlib1g-dev netcat mysql-client libgd-dev libfreetype6-dev libjpeg62-turbo-dev libpng12-dev RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ RUN docker-php-ext-install pdo pdo_mysql zip gd WORKDIR /var/www COPY . /var/www RUN chown -R www-data:www-data /var/www RUN composer install RUN php artisan clear-compiled COPY wait.sh /usr/local/bin/wait.sh RUN chmod +x /usr/local/bin/wait.sh CMD /usr/local/bin/wait.sh && composer update --no-scripts && composer dumpautoload && php artisan storage:link && php artisan migrate && php artisan serve --host=0.0.0.0 --port=8000 EXPOSE 8000