Skip to content

Commit eda1d2b

Browse files
committed
fix: ensure safe.directory is set for www-data user in Dockerfile
1 parent 144a04d commit eda1d2b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docker/php/package.Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@ RUN install-php-extensions @composer zip
99

1010
COPY docker/php/unit.json /docker-entrypoint.d/config.json
1111
COPY docker/php/php.ini /usr/local/etc/php/conf.d/satisfy.ini
12-
RUN chown -R www-data:www-data /var/www
12+
RUN chown -R www-data:www-data /var/www && \
13+
git config --global --add safe.directory /var/www/html
1314

1415
USER www-data
1516
RUN mkdir -p ~/.ssh && chmod 0700 ~/.ssh && ssh-keyscan -H github.com >> ~/.ssh/known_hosts && \
1617
mkdir -p ~/.composer && \
1718
wget -O ~/.composer/keys.dev.pub https://composer.github.io/snapshots.pub && \
18-
wget -O ~/.composer/keys.tags.pub https://composer.github.io/releases.pub
19+
wget -O ~/.composer/keys.tags.pub https://composer.github.io/releases.pub && \
20+
git config --global --add safe.directory /var/www/html
1921
VOLUME /var/www/.composer
2022

2123
ENV APP_PATH=/var/www/html

0 commit comments

Comments
 (0)