Steve
Steve

Reputation: 1963

Docker running really slow on mac after PHP 7.4 > 8 update

We've recently updated our docker config from PHP7.4 to PHP8 running on Ubuntu 20.04.

For most of the team this has been fine. For me and one other (both using mac) our local env is now running noticably slower. Switching back to PHP7.4 solves the problem. Others in the team (Windows and macOS) do not have this issue.

Big Sur 11.6.4 - slow
Monterey 12.3 - slow
Monterey 12.1 - fine

No idea where to even start looking - any ideas?

Upvotes: 1

Views: 547

Answers (1)

Steve
Steve

Reputation: 1963

Found it eventually, posting an answer in case it helps anyone else.

Adding the following variables to docker-compose.yml resolved the issue.

services:
    laravel.test:
        environment:
            XDEBUG_MODE: '${SAIL_XDEBUG_MODE:-off}'
            XDEBUG_CONFIG: '${SAIL_XDEBUG_CONFIG:-client_host=host.docker.internal}'

Upvotes: 1

Related Questions