Merge pull request #198 from sarahelsagheir/main
Add Permission Configurations to Dockerfile
This commit is contained in:
@@ -4,6 +4,10 @@ COPY php.ini /usr/local/etc/php/
|
||||
COPY docker.conf /usr/local/etc/php-fpm.d/docker.conf
|
||||
COPY .bashrc /root/
|
||||
|
||||
# Copy the entrypoint script
|
||||
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||
RUN chmod +x /usr/local/bin/entrypoint.sh
|
||||
|
||||
# mix
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y build-essential zlib1g-dev default-mysql-client curl gnupg procps vim git unzip libzip-dev libpq-dev \
|
||||
@@ -53,3 +57,7 @@ RUN git clone https://github.com/seebi/dircolors-solarized
|
||||
|
||||
EXPOSE 5173
|
||||
WORKDIR /var/www
|
||||
|
||||
#entrypoint
|
||||
ENTRYPOINT ["entrypoint.sh"]
|
||||
CMD ["php-fpm"]
|
||||
13
.docker/php/entrypoint.sh
Normal file
13
.docker/php/entrypoint.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# Set permissions for Laravel directories
|
||||
chown -R www-data:www-data /var/www/storage /var/www/bootstrap/cache
|
||||
chmod -R 775 /var/www/storage /var/www/bootstrap/cache
|
||||
|
||||
# permissions for PHPMyAdmin
|
||||
mkdir -p /sessions
|
||||
|
||||
chmod 777 /sessions
|
||||
|
||||
exec "$@"
|
||||
Reference in New Issue
Block a user