Docker extremely slow, on linux and windows

Make sure you format your post properly so links in the code will not be interpreted and made clickable.

Since you did that on stack overflow, I would think that you did that here too, so the forum should not have banned your post.

The only reason I can think of to make Docker slow on Linux without using Docker Desktop is the fact that it uses a special filesystem. Usually overlay2. When you run Xampp on your machine, it will just use the filesystem of your host directly. If Docker data root is on a local HDD or SSD, it should not matter. In case you mount your data root from a network filesystem or some other special drive which is not compatible with overlay2 that can make Docker slower if it works at all.

In case of Docker Desktop, your local files would be mounted into the virtual machine using VirtioFS so those files would not be used directly. I think VirtioFS should be faster that other solutions, but I have never used Docker Desktop for Linux in a situation in which I would notice the speed difference. I use My Docker Desktop for Mac frequently (not for write-intensive or read-intensive applications) and it works fine. So in case of Docker Desktop you can take @meyay’s advice and use volumes instead of bind mounts whenever it is possible. In case of Docker CE running on the host directly on a local disk it should be as fast as running the application without containers since the process inside the container actually runs on your host, it is just isolated from the rest of the environment.

Since you shared your docker info on stackoverflow showing that you use Docker Desktop for Linux, you will most likely get answers to tell you the cause is that Docker Desktop uses a virtual machine to run your containers, so I recommend you to share the result of docker info running directly on your host not on Docker Desktop.