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

Đang mở
#13,743 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

  • #13870 của @maxpetrusenkoagent — đã đóng, không merge

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
docker, docker-compose, go, linux, node.js
Lĩnh vực
devops, infrastructure

Hướng nghiên cứu

Tái hiện lỗi trên Linux với môi trường Compose v2.27.1 được mô tả, sử dụng một compose.yml có develop.watch, một hành động sync và các chỉnh sửa bên dưới ./src. Theo dõi hành vi đồng bộ hóa của watch từ cấu hình đó; issue được hoàn tất khi các thay đổi đối với tệp trên host được phát hiện và xuất hiện trong container đang chạy mà không cần khởi động lại service.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

kind/bug status/0-triage
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

Ngôn ngữ chính
Go
Star
38.9k
Fork
6k
Merge trung bình
2 ngày 22 giờ
Pull request đã merge (30 ngày)
81

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của docker/compose

Tất cả issue của docker/compose

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.