From 0a0d8e10464a91664ef7a88c1f6549d7cb5d813b Mon Sep 17 00:00:00 2001 From: Too Date: Fri, 22 Jun 2018 22:06:09 +0800 Subject: [PATCH] revert changes on docker --- Dockerfile | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/Dockerfile b/Dockerfile index 51dc3fd1..5eb8b990 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,21 +1,13 @@ -# Set the base image for subsequent instructions -FROM php:7.1 +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 /app +COPY . /app +RUN composer install -# Update packages -RUN apt-get update - -# Install PHP and composer dependencies -RUN apt-get install -qq git curl libmcrypt-dev libjpeg-dev libpng-dev libfreetype6-dev libbz2-dev - -# Clear out the local repository of retrieved package files -RUN apt-get clean - -# Install needed extensions -# Here you can install any other extension that you need during the test and deployment process -RUN docker-php-ext-install mcrypt pdo_mysql zip - -# Install Composer -RUN curl --silent --show-error https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer - -# Install Laravel Envoy -RUN composer global require "laravel/envoy=~1.0" \ No newline at end of file +COPY wait.sh /usr/local/bin/wait.sh +RUN chmod +x /usr/local/bin/wait.sh +CMD /usr/local/bin/wait.sh && composer dumpautoload && php artisan migrate && php artisan db:seed && php artisan serve --host=0.0.0.0 --port=8000 +EXPOSE 8000