I use a stack of different docker container on Ubuntu and they are, compared to a Windows with WSL very slow. We can rule out network issues, because a simple Symfony Command that only measures the exection duration with micro_time
, takes 0.5 seconds on my machine, and 0.1 on the Windows machine.
There was one major difference: I used a bind mount to mount the symfony code in my cli
container (Image: php:7.4-cli
), the windows machine uses a shared volume with an automated sftp upload.
My first approach was to also use a shared mount, but there is no speed improvement. Other approaches, like cached volumes, didn't change anything, and I also rule out my hard disk, because it's a pretty fast M.2 SSD.