Skip to content

[BUG] watch: can't watch a service without a build section #10270

Closed
@nocive

Description

@nocive

Description

I understand the watch feature is still very much experimental and being worked on, however I wanted to get a feel on how I could leverage it in the future.

I have a big docker compose project (100+ containers) some of them with build context, some of them without.
No matter how I run the docker compose alpha watch command I always get the error:

can't watch a service without a build section

I get this message even when the target service has a build section, I can only guess it's complaining about the dependencies of said service, which feels like a bug.

Would it be possible and make sense to ignore/skip services which do not have a build section instead of erroring out?

Steps To Reproduce

Project too big to share and I didn't have the time to isolate the problem, sorry 😶

I can try to get a reproduction scenario up once I have the time, but I'm assuming this bug report should be fairly obvious to @ndeloof without further information here :)

Compose Version

Docker Compose version v2.16.0

Docker Environment

Client:
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc., v0.9.1)
  compose: Docker Compose (Docker Inc., v2.16.0)
  scan: Docker Scan (Docker Inc., v0.1.0-227-g061fe0a0c5)

Server:
 Containers: 328
  Running: 2
  Paused: 0
  Stopped: 326
 Images: 396
 Server Version: 20.10.20
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: 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 logentries splunk syslog
 Swarm: inactive
 Runtimes: runc io.containerd.runc.v2 io.containerd.runtime.v1.linux
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 96df0994faabc1944fc614e52b0b3c6feb609a57.m
 runc version: 
 init version: de40ad0
 Security Options:
  seccomp
   Profile: default
  cgroupns
 Kernel Version: 5.18.1-arch1-1
 Operating System: xxx
 OSType: linux
 Architecture: x86_64
 CPUs: 4
 Total Memory: 15.49GiB
 Name: xxx
 ID: xxx
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Username: xxx
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: true
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

Anything else?

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions