docker / docker/compose

[BUG] docker compose watch fails to sync file changes for Node.js app when using bind mounts on Linux

Open
#13,743 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/bug status/0-triage
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
  1. Create a Node.js project with a compose.yml using develop.watch with sync action
  2. Run docker compose watch
  3. Edit a .js file inside ./src on the host
  4. Observe that the running container does NOT reflect the updated file
  5. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.