[BUG] ctrl+c doesn't exit docker-compose logs
Description
When using docker-compose version 2.14.1-1 and running docker-compose logs CONTAINER_NAME you cannot exit the prompt with CTRL+C.
Downgrading to 2.12.2 seems to fix the issue.
Steps To Reproduce
- Use docker-compose version 2.14.1-1
- Run "docker-compose logs CONTAINER_NAME"
- CTRL + C
- You cannot exit from the container
Compose Version
2.14.1-1
Docker Environment
Client:
Context: default
Debug Mode: false
Plugins:
compose: Docker Compose (Docker Inc., 2.12.2)
Server:
Containers: 34
Running: 11
Paused: 0
Stopped: 23
Images: 185
Server Version: 20.10.21
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: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
Default Runtime: runc
Init Binary: docker-init
containerd version: a05d175400b1145e5e6a735a6710579d181e7fb0.m
runc version:
init version: de40ad0
Security Options:
seccomp
Profile: default
cgroupns
Kernel Version: 5.15.84-1-MANJARO
Operating System: Manjaro Linux
OSType: linux
Architecture: x86_64
CPUs: 16
Total Memory: 31.06GiB
Name: florianpendaries
ID: PAYU:SRVT:PHL4:337A:EZSV:MVNQ:7CM3:IWCQ:7JCN:6LAV:YGK5:Q4PF
Docker Root Dir: /var/lib/docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Anything else?
No response
Hello @Aerowiel Can you try v2.14.2, this issue should have been fixed by https://github.com/docker/compose/pull/10104
I am also seeing this. Never seen it until upgrading to v2.14.1 a few days ago. v2.14.2 is not currently available on the Debian Bullseye main sources yet.
Also encountered with v2.15.1 while following the output. (-f/--follow)
@ahmetgeymen Can you provide a sample Compose file to reproduce this? Otherwise we can't dig into it. I'll reopen when there's more information.
@ahmetgeymen Can you provide a sample Compose file to reproduce this? Otherwise we can't dig into it. I'll reopen when there's more information.
services:
spring-docker:
image: springio/gs-spring-boot-docker
ports:
- "8080:8080"
First running with docker compose up --build -d and then following logs with docker compose logs -f but I can't exit with CTRL + C or CTRL + Z.
@ahmetgeymen The example you provided works fine for me. Could you try with the latest Compose version v2.15.1 and see if you still face this?
@laurazard
I've just uploaded a video showing the issue. I use docker compose v2.15.1.
https://youtu.be/Wv6eAW9ImI4
Thanks @ahmetgeymen, I can see the issue. @ndeloof, any ideas?
indeed, trying to make logs command a background task fails. But it works when running the CLI plugin directly
$ ~/.docker/cli-plugins/docker-compose logs -f
...
truc-test-1 | 2023-01-26 12:34:52.249+0000 [id=49] INFO hudson.util.Retrier#start: Performed the action check updates server successfully at the attempt #1
^Z
[2]+ Stopped ~/.docker/cli-plugins/docker-compose logs -f
Same using the raw Docker CLI:
$ com.docker.cli compose logs -f
truc-test-1 | *************************************************************
truc-test-1 |
^Z
[2]+ Stopped com.docker.cli compose logs -f
So, this is a Cloud integration CLI issue 😅
The title of the issue focuses on version 2.14.1-1, sorry for interruption with 2.15.1. A new issue may be created or the issue title may be updated. Thanks again for your interest.
This bug is still present in v2.18.1
docker compose up -d with any docker-compose file, and attempting to cancel with CTRL+C will cause the output to remain on the screen
@ryanneufeld can you try using com.docker.cli compose ... to reproduce this issue ?