From 183f83e1d2f0beffb8ab128bc6ded02701fdd03d Mon Sep 17 00:00:00 2001 From: Carvallegro Date: Sat, 30 Dec 2017 03:49:21 +1100 Subject: [PATCH] Updated DockerFile to add PHP extensions and reflect changes made by @beinbm I didn't keep the mysql service in the docker-compose file as it's also used to build the container. I'd recommand creating another docker-compose to do this. Preparations are made to push the Docker image to DockerHub --- Dockerfile | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9cdcb50d5..e1d84c142 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,18 @@ FROM php:apache + COPY . /var/www/html/ # Authorize these folders to be edited RUN chmod -R 777 /var/www/html/storage RUN chmod -R 777 /var/www/html/bootstrap/cache -# Install ZIP extension -RUN apt-get update && \ - apt-get install -y --no-install-recommends zip libzip-dev -RUN pecl install zip && \ - docker-php-ext-enable zip +RUN apt-get update && apt-get install -y zip libzip-dev libpng-dev \ + && docker-php-ext-install pdo_mysql gd zip \ + && rm -rf /var/lib/apt/lists/* # Allow rewrite RUN a2enmod rewrite + +#CMD ["/bin/bash", "/opt/your_app/init.sh"] +# php -f ... +# php artisan make:command ConfigureApp --command=app:configure \ No newline at end of file