Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[BUG] docker compose up --watch does not work in tmux without sudo #12385

Open
tinmarr opened this issue Dec 15, 2024 · 4 comments
Open

[BUG] docker compose up --watch does not work in tmux without sudo #12385

tinmarr opened this issue Dec 15, 2024 · 4 comments
Assignees
Labels

Comments

@tinmarr
Copy link

tinmarr commented Dec 15, 2024

Description

When using docker compose up --watch in tmux, the interactive menu is not able to start without using sudo. Without the interactive menu, all the watch functionality just doesn't work.

Steps To Reproduce

  1. Using the following minimal compose.yml:
services:
  test:
    build: .
    container_name: test

    develop:
      watch:
        - action: rebuild
          path: .
  1. Open a tmux session (I'm using tmux 3.5a)
  2. Run docker compose up --watch. Here is the output (notice how watch doesn't work):
    Image
  3. Run sudo docker compose up --watch. Here is the output:
    Image

Not pictured but the interactive menu at the bottom only appears in the sudo example.

Compose Version

Docker Compose version 2.32.0

Docker Environment

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

Server:
 Containers: 3
  Running: 0
  Paused: 0
  Stopped: 3
 Images: 8
 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: 207ad711eabd375a01713109a8a197d197ff6542.m
 runc version: 
 init version: de40ad0
 Security Options:
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 6.12.3-arch1-1
 Operating System: Arch Linux
 OSType: linux
 Architecture: x86_64
 CPUs: 16
 Total Memory: 31.16GiB
 Name: martinpc
 ID: fdefd076-daa0-4ea2-973d-57ff6558fde6
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

Anything else?

No response

@glours
Copy link
Contributor

glours commented Dec 16, 2024

Hello @tinmarr

I'm not able to reproduce on my side (Ubuntu VM on my Mac), can you try a simple docker compose up and share the log? I wonder if there isn't an issue with the navigation menu.
Do you use remote tmux session via ssh or are you directly connected to the Arch distro? If so what is the result of docker compose up --watch without using tmux?

@tinmarr
Copy link
Author

tinmarr commented Dec 16, 2024

Here is the docker compose up in tmux: Image

The Arch distro is my main machine (on physical hardware) and SSHing into it from another machine produces the same results (with/without tmux).

Here is the docker compose up --watch without tmux:
Image

@glours
Copy link
Contributor

glours commented Dec 16, 2024

I want to check if there isn't any issue with the navigation menu in your configuration, can you try the following command in your Tmux session COMPOSE_MENU=false docker compose up --watch

@tinmarr
Copy link
Author

tinmarr commented Dec 16, 2024

That env variable fixes the issue indeed. (Works just like sudo or outside tmux)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants