We added a 180G nfs (aws efs) volume to my docker-compose recently, and it took about 7 minutes to start up, if we remove the nfs volume, it can start up in 1 minute, and we did some testing, the larger the nfs, the slower the startup.
Does anyone know why? Or is there some way to see what was the docker doing? I out put the docker logs, but only successful messages.
2022-04-13T06:28:46.662408516Z Hosting environment: Production
2022-04-13T06:28:46.662443259Z Content root path: /app
2022-04-13T06:28:46.662536439Z Now listening on: http://[::]:8002
2022-04-13T06:28:46.662550521Z Application started. Press Ctrl+C to shut down.
My docker version: 20.10.14.
My docker compose version: 1.29.2.
Below is my docker-compose.yml
version: '2'
services:
app:
image: xxxx
restart: always
environment:
- ASPNETCORE_ENVIRONMENT=Production
ports:
- "8002:8002"
volumes:
- "./BinaryObjects/Static:/app/App_Data/BinaryObjects/Static"
- "./BinaryObjects/Temp:/app/App_Data/BinaryObjects/Temp"
/BinaryObjects is the root path of nfs.