FG
☁️ Cloud & DevOpsDocker

failed to get console mode for stdout: The handle is invalid.

Freshalmost 5 years ago
Mar 14, 20260 views
Confidence Score81%
81%

Problem

Description of the issue The `docker-compose build` command prints this `failed` error every time. Context information (for bug reports) Output of `docker-compose version` [code block] Output of `docker version` [code block] Output of `docker-compose config` (Make sure to add the relevant `-f` and other flags) [code block] and the Dockerfile can be anything, this works [code block] Steps to reproduce the issue 1. Create any Dockerfile on Windows 2. Create any Docker Compose manifest with a build section pointing to the same Dockerfile 3. Run `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. [code block] Expected result The plain Docker build command works as expected. [code block] Stacktrace / full error message [code block] Additional information OS version / distribution, `docker-compose` install method, etc.

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
High Confidence Fix
77% confidence100% success rate5 verificationsLast verified Mar 14, 2026

Solution: failed to get console mode for stdout: The handle is invalid.

Low Risk

Same for me. After yesterday update console output for `docker-compose build` changed. And it throws "failed to get console mode for stdout: The handle is invalid." Windows 10 Docker Desktop 3.2.1 Fallback to Docker Desktop 3.1.0 helped

77

Trust Score

5 verifications

100% success
  1. 1

    Same for me. After yesterday update console output for `docker-compose build` ch

    Same for me. After yesterday update console output for `docker-compose build` changed. And it throws "failed to get console mode for stdout: The handle is invalid."

  2. 2

    Step 2

    Docker Desktop 3.2.1

  3. 3

    Fallback to Docker Desktop 3.1.0 helped

    Fallback to Docker Desktop 3.1.0 helped

Validation

Resolved in docker/compose GitHub issue #8186. Community reactions: 10 upvotes.

Verification Summary

Worked: 5
Partial: 1
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

dockerdocker-composecontainerskind/bug