-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
failed to get console mode for stdout: The handle is invalid. #8186
Comments
I noticed this warning message only appears when running Docker Compose commands. It looks like both Docker and Docker Compose merged changes to use native build / buildx by default now. Why is this warning still here?
And why does the handle error disappear when I turn off native build?
|
Same for me. After yesterday update console output for Windows 10 Fallback to Docker Desktop 3.1.0 helped |
I had the same issues since upgrading to 3.2.1 yesterday (on Windows 10). Aside of that failed message, my builds also seemed to hang on one specific line, so I also reverted to version 3.1.0. Afterwards I figured that the line probably just takes a long time and it would actually have completed ... but 3.1.0 shows the console output I'm used to, which gives a more comfortable feeling: it's "clearly still doing stuff and not just hanging". So this does indeed feel like a serious issue. (The screenshot in the OP confuses me a bit, because it shows 3.1.0, while the issue for ternavsky and I only appeared on 3.2.1.) |
same issue. |
same issue |
Same issue. Is there a way to prevent auto update? |
I just deny Docker desktop to make changes in the system on startup. After that you should run Docker by yourself, cause autostart won't work. After a minute it continues to threat me that it will be updated on the next reboot) |
Same fore me. In normal command window this works:
If I put the variable on 1 it gives the handle error. I updated today, March 15th
|
same issue. |
+1 |
Great suggestion above. In VS Code, I'm adding to the workspace settings:
The first time, VS Code will ask if you allow setting this variable, when you open the terminal. "docker-compose build" will now work properly. |
This is actually driving me crazy, I have so many developers affected because of this... |
Any update on what's happening with this? It's happening to all of my developers, and it's obscuring the logs. |
Same problem on my side. It would be great to get an update. |
Having this same issue and interested in a solution as well. |
seems error is triggered by https://github.com/containerd/console/blob/master/console_windows.go#L54 |
I expected this could be fixed by running build with --progress=plain, but unfortunately error persists. There might be another piece of code using |
+1 |
same issue. |
Same issue, docker-compose build stuck at
after updating docker, and
warning appears. COMPOSE_DOCKER_CLI_BUILD=0 doesn't solve the problem.
It would be great if auto-update is an option. |
Fixed in docker-compose version 1.29.1, for those that want to cross-reference with |
I can confirm that I don't get this error anymore. On Windows, I had to manually download the new |
@JeremyKennedy I can confirm that too. Only solved after manually downloading the binary (link below) and replacing it manually. |
How to replace docker-compose manually on windows ? |
@shakyav download the .exe from the link: https://github.com/docker/compose/releases Replace the If you don't know where |
Just like to add a way to search using standard tools of the operating system (i.e. PowerShell): (Get-ChildItem Env:Path).Value.Split(';')
| Where-Object { $_.IndexOf('Docker') -gt 0 }
| ForEach-Object { Get-ChildItem -Path $_ -Include 'docker-compose.exe' -Recurse 2>$Null } ... returning: Directory: C:\Program Files\Docker\Docker\resources\bin
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 12.05.2021 23:38 10452224 docker-compose.exe |
I had this problem launching from PowerShell. However, when launching from WSL2 it built correctly. |
This seems to be tangentially relayed to the docker-compose command being merged into the "docker" command, i.e. "docker compose up -d" vs "docker-compose up -d". Using the latter I was getting this error, but the former works. |
Got the same error "failed to get console mode for stdout: The handle is invalid." for the command "docker compose run --rm ". I am using Docker Desktop for Windows 10. $ docker --version $ docker-compose --version |
seconded - it's back with these on Win10 |
Same here - getting the warning on Windows 11: failed to get console mode for stdin: The handle is invalid. Warning appears every time when I run /EDIT: Confirmed in Ubuntu Linux as well. |
I'm having the same "issue" on Windows while running a shell script containing the command: But when I run the same script on macOS (Apple M1): It seems that the Docker image builds anyway but this could be problematic as my container won't work when run from Windows built image... |
I am experiencing the issue when piping a docker command (e.g. |
@CollinAlpert try running |
Getting the same error message except it's directly from
When redirecting the output of a bat script to a file from regular Windows cmd: Withing cmd:
Then continues logging after the execution of the docker command is complete. |
I only started getting this last week with Git for Windows' bash run through Windows Terminal.
Redirect turned out to show the same thing: $ docker build -q . > hash
$ cat hash
failed to get console mode for stdout: The handle is invalid.
sha256:c7c0efb9f8895c8a9d41e630051d503dc31d1537bbdbd8fb7a0e0de6b58499d8 Update: Happens with both HyperVisor and WSL 2. |
I am facing same in powershell. No issue,
Having issue,
Running this in the wsl (but not with docker desktop, directly installed with get.docker.com),
Running inside wsl in docker desktop,
|
Our Windows developer has the same problem on Windows 11:
The following docker command produced the same error message.
We downgraded docker to version 4.26.1 and that also solved the issue for us. |
@AnthonyMastrean Would you mind reopening this issue? As it is clrearly still broken in the latest release so far... |
@jcmuel please report this issue to github.com/docker/cli as you can reproduce with a plain |
The issue is also discussed here: docker/for-win#13891 @ndeloof : Should I report it anyway also in docker/cli ? |
nope, docker/for-win#13891 already has enough details AFAICT |
on pwsh the only way I tought of to get around this is by using docker ps --filter "status=running" --filter "name=mongodb" -q | Select-Object -Skip 1 |
Docker Desktop 4.27.2 had this error. Docker Desktop 4.28.0 fixed this for me. |
Description of the issue
The
docker-compose build
command prints thisfailed
error every time.Context information (for bug reports)
Output of
docker-compose version
Output of
docker version
Output of
docker-compose config
(Make sure to add the relevant
-f
and other flags)and the Dockerfile can be anything, this works
Steps to reproduce the issue
docker-compose build
Observed result
The Docker Compose build command always prints the
failed
line. Nothing else seems to be wrong, but I'm not sure.Expected result
The plain Docker build command works as expected.
Stacktrace / full error message
Additional information
OS version / distribution,
docker-compose
install method, etc.The text was updated successfully, but these errors were encountered: