When using Docker Compose, my service takes a very long time - around 20 seconds, but sometimes north of 30 - to start doing anything. It says “Creating <service_name>” as usual, takes about 1-2 seconds to add the usual green “done”, and then 20 seconds to run a simple command, as shown in this example:
λ docker-compose run --rm build pwd Creating woocommerce_build_run ... done /app
I use the
build service to build my project using Gulp. I thought this might be an issue of speed related to shared mounted files/folders, but the actual tasks run by Gulp don’t take very long, and they work on hundreds of files, and also involve network.
This is on Win10, Docker Desktop 2.4.2, Docker Compose 1.27.4, Docker 20.10.0-beta1, using native Hyper-V virtualization. Core i7-9750H, 16 GB RAM, and an NVMe disk.
Any ideas what may be taking so long?