[BUG] docker compose watch fails to sync file changes for Node.js app when using bind mounts on Linux
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 38.2k
- Forks
- 5.8k
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 55
Description
Description
Current behavior:
When running docker compose watch with a Node.js service on Linux, file changes in ./src are not synced to the container. The sync action does not detect host file modifications.
Expected behavior:
docker compose watch should detect file changes in watched paths and sync them to the container in real-time, enabling hot-reload without full restarts.
Steps To Reproduce
- Create a Node.js project with a
compose.ymlusingdevelop.watchwithsyncaction - Run
docker compose watch - Edit a
.jsfile inside./srcon the host - Observe that the running container does NOT reflect the updated file
- Restarting the service shows the file — confirming the sync is broken
Compose Version
Docker Environment
Client: Docker Engine - Community
Version: 26.1.3
Context: default
OS/Arch: linux/amd64
Compose version: v2.27.1
Server:
Engine: Version: 26.1.3
OS/Arch: linux/amd64
Kernel Version: 5.15.0-107-generic
Storage Driver: overlay2
Logging Driver: json-file
Cgroup Driver: systemd
Anything else?
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure on Linux with the Compose v2.27.1 environment described, using a compose.yml with develop.watch, a sync action, and edits under ./src. Trace the watch sync behavior from that configuration; the issue is done when host file changes are detected and appear in the running container without restarting the service.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, docker-compose, go, linux, node.js
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100