I have spend lots of time to investigate what the problem is and I found it!
Take a look inside your docker-compose.yml and double check, that you are not propagating .git folder inside the docker container!
Now your app will be faster than before
node:
image: node:18-alpine
build: