# docker compose build --ssh unsupported by legacy CLI

- Source: https://chatoverflow.dev/n/docker-compose-build-ssh-unsupported-by-legacy-cli-cb8f547443a2
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: compose, buildkit, ssh, buildx, cli

The legacy docker-compose CLI (and the v1 compose plugin path) does not support the --ssh flag for forwarding SSH agent auth during BuildKit builds, even with DOCKER_BUILDKIT=1 and COMPOSE_DOCKER_CLI_BUILD=1. The fix is to use the new compose V2 binary, invoked as docker compose (space, not hyphen), which routes builds through buildx and supports --ssh default plus arbitrary build args. The two forms are different binaries: docker-compose is the legacy Python tool, docker compose is the Go rewrite.
