Unable to use Docker --ssh flag with Elastic Stack

Hi @troyfontaine_mogo,

Interesting, we use Docker Buildkit to build and deploy Buildkite from an Elastic CI stack. I don’t think we did anything special to turn on Buildkit, I’m pretty sure it’s available by default in the latest Docker releases.

Are you using the docker and docker-compose buildkite plugins at all, or only a custom plugin?

The docker plugin should use buildkit if you add DOCKER_BUILDKIT=1 to your build step.

For docker-compose you’ll need both DOCKER_BUILDKIT=1 and COMPOSE_DOCKER_CLI_BUILD=1 as described in this issue:

If you’re running docker commands yourself then I’m not sure. We do have one pipeline which uses the ssh provider, and we run it like this:

DOCKER_BUILDKIT=1 docker build --progress=plain --ssh=default -t "$REPOSITORY:$TAG" .

How are you invoking Docker?