Skip to content

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

@Vansh1811

Description

@Vansh1811

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions