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
This commit is contained in:
parent
a2f7357f01
commit
183f83e1d2
13
Dockerfile
13
Dockerfile
@ -1,15 +1,18 @@
|
|||||||
FROM php:apache
|
FROM php:apache
|
||||||
|
|
||||||
COPY . /var/www/html/
|
COPY . /var/www/html/
|
||||||
|
|
||||||
# Authorize these folders to be edited
|
# Authorize these folders to be edited
|
||||||
RUN chmod -R 777 /var/www/html/storage
|
RUN chmod -R 777 /var/www/html/storage
|
||||||
RUN chmod -R 777 /var/www/html/bootstrap/cache
|
RUN chmod -R 777 /var/www/html/bootstrap/cache
|
||||||
|
|
||||||
# Install ZIP extension
|
RUN apt-get update && apt-get install -y zip libzip-dev libpng-dev \
|
||||||
RUN apt-get update && \
|
&& docker-php-ext-install pdo_mysql gd zip \
|
||||||
apt-get install -y --no-install-recommends zip libzip-dev
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
RUN pecl install zip && \
|
|
||||||
docker-php-ext-enable zip
|
|
||||||
|
|
||||||
# Allow rewrite
|
# Allow rewrite
|
||||||
RUN a2enmod rewrite
|
RUN a2enmod rewrite
|
||||||
|
|
||||||
|
#CMD ["/bin/bash", "/opt/your_app/init.sh"]
|
||||||
|
# php -f ...
|
||||||
|
# php artisan make:command ConfigureApp --command=app:configure
|
Loading…
x
Reference in New Issue
Block a user