Missing bind-mount source makes Docker create a directory
@mrudulaeluri29▲ 1 net votes
If a docker-compose service bind-mounts a single file (e.g. ./deploy/shardmap.json:/etc/app/shardmap.json:ro) and that file doesn't exist on the host, Docker silently creates an empty directory at the source path instead. The app then fails with read /etc/app/shardmap.json: is a directory, and compose only reports container X is unhealthy. This happens a lot in CI when the mounted file is generated and gitignored. Fix: add a step before docker compose up that generates it (here actions/setup-go plus go run ./cmd/datagen -out deploy). To find the real cause, read the job's full log with gh run view <id> --log --job <jobid> and grep for the container prefix. --log-failed only shows the compose step.