Skip to content

[BUG] Compose Watch restart action does not monitor bind mounts #12400

@bsuth

Description

@bsuth

Description

When using action: restart, specifying a path that is a bind mount results in the following error:

WARN[0000] path '/home/...' also declared by a bind mount volume, this path won't be monitored! 

Steps To Reproduce

  1. compose.yaml
services:
  test:
    image: bash
    command: sleep 1m
    volumes:
      - .:/test
    develop:
      watch:
        - path: .
          action: restart

Compose Version

Docker Compose version 2.32.1

Docker Environment

Client:
 Version:    27.3.1
 Context:    default
 Debug Mode: false
 Plugins:
  compose: Docker Compose (Docker Inc.)
    Version:  2.32.1
    Path:     /usr/lib/docker/cli-plugins/docker-compose

Server:
 Containers: 4
  Running: 0
  Paused: 0
  Stopped: 4
 Images: 12
 Server Version: 27.3.1
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: true
  Native Overlay Diff: false
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 88aa2f531d6c2922003cc7929e51daf1c14caa0a.m
 runc version: 
 init version: de40ad0
 Security Options:
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 6.12.4-arch1-1
 Operating System: Arch Linux
 OSType: linux
 Architecture: x86_64
 CPUs: 12
 Total Memory: 15.23GiB
 Name: bsuth
 ID: 0d2ac96b-cd23-401e-be0c-c394f4021f3b
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled

Anything else?

The original request for the restart action was for use with bind mounts, so I believe this is a bug, but please correct me if I am mistaken or am using the config incorrectly!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions