docker / compose

Define and run multi-container applications with Docker
https://docs.docker.com/compose/
Apache License 2.0
32.97k stars 5.1k forks source link

[BUG] compose up does not always reset terminal if menu is enabled #11947

Closed sebbASF closed 1 day ago

sebbASF commented 4 days ago

Description

If docker compose up fails to complete (e.g. because an external volume is not accessible), the terminal can remain in no-echo mode if the menu is enabled.

This does not happen if COMPOSE_MENU=0

Steps To Reproduce

Create a compose.yaml file with an invalid entry under volumes:, e.g. /tmp (assuming that was not exposed)

compose.yaml:
services:
  test:
    image: test
    build: .
    volumes:
      - /tmp:/var/data

$ docker compose up

Error response from daemon: Mounts denied: 
The path /tmp is not shared from the host and is not known to Docker.
You can configure shared paths from Docker -> Preferences... -> Resources -> File Sharing.
See https://docs.docker.com/desktop/mac for more info.

Compose Version

$ docker-compose version
Docker Compose version v2.27.1-desktop.1
$ docker compose version
Docker Compose version v2.27.1-desktop.1

Docker Environment

No response

Anything else?

No response

ndeloof commented 2 days ago

Already fixed by https://github.com/docker/compose/pull/11896 AFAICT Please test latest release

sebbASF commented 2 days ago

I am running Docker Desktop 4.31.0 (153195) on macOS M1. AFAICT that is the latest.

^C works, but the terminal is left in no-echo mode if the startup fails.

ndeloof commented 2 days ago

get latest from https://github.com/docker/compose/releases

sebbASF commented 1 day ago

Docker compose comes as part of Docker desktop and I don't want to mess with the installation in case it breaks something, as I have had lots of problems in the past with updates not working.

ndeloof commented 1 day ago

ok then I'll close this issue, feel free to comment after Docker Desktop comes with v2.28.x if issue persists