compose icon indicating copy to clipboard operation
compose copied to clipboard

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

Open sebbASF opened this issue 1 year ago • 1 comments

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

sebbASF avatar Jun 29 '24 13:06 sebbASF

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

ndeloof avatar Jul 01 '24 06:07 ndeloof

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.

sebbASF avatar Jul 01 '24 10:07 sebbASF

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

ndeloof avatar Jul 01 '24 10:07 ndeloof

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.

sebbASF avatar Jul 01 '24 15:07 sebbASF

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

ndeloof avatar Jul 01 '24 16:07 ndeloof