8000 Merge pull request #198 from sarahelsagheir/main · sunilgitb/laravel-docker@184a31e · GitHub
[go: up one dir, main page]

Skip to content

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 184a31e

Browse files
authored
Merge pull request refactorian#198 from sarahelsagheir/main
Add Permission Configurations to Dockerfile
2 parents 96394fa + c46c565 commit 184a31e

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

.docker/php/Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ COPY php.ini /usr/local/etc/php/
44
COPY docker.conf /usr/local/etc/php-fpm.d/docker.conf
55
COPY .bashrc /root/
66

7+
# Copy the entrypoint script
8+
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
9+
RUN chmod +x /usr/local/bin/entrypoint.sh
10+
711
# mix
812
RUN apt-get update \
913
&& 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
5357

5458
EXPOSE 5173
5559
WORKDIR /var/www
60+
61+
#entrypoint
62+
ENTRYPOINT ["entrypoint.sh"]
63+
CMD ["php-fpm"]

.docker/php/entrypoint.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/sh
2+
set -e
3+
4+
# Set permissions for Laravel directories
5+
chown -R www-data:www-data /var/www/storage /var/www/bootstrap/cache
6+
chmod -R 775 /var/www/storage /var/www/bootstrap/cache
7+
8+
# permissions for PHPMyAdmin
9+
mkdir -p /sessions
10+
11+
chmod 777 /sessions
12+
13+
exec "$@"

0 commit comments

Comments
 (0)
0