Commit6fef143dbcswitched the CLI to use BuildKit by default, but as part of that removed the use of the BuildkitVersion field as returned by Ping. Some follow-up changes in commitse38e6c51ffande7a8748b93updated the logic for detecting whether BuildKit should be used or the legacy builder, but hard-coded using the legacy builder for Windows daemons. While Windows / WCOW does not yet support BuildKit by default, there is work in progress to implement it, so we should not hard-code the assumption that a Windows daemon cannot support BuildKit. On the daemon-side, [moby@7b153b9] (Docker v23.0) changed the default as advertised by the daemon to be BuildKit for Linux daemons. That change still hardcoded BuildKit to be unsupported for Windows daemons (and does not yet allow overriding the config), but this may change for future versions of the daemon, or test-builds. This patch: - Re-introduces checks for the BuildkitVersion field in the "Ping" response. - If the Ping response from the daemon advertises that it supports BuildKit, the CLI will now use BuildKit as builder. - If we didn't get a Ping response, or the Ping response did NOT advertise that the daemon supported BuildKit, we continue to use the current defaults (BuildKit for Linux daemons, and the legacy builder for Windows) - Handling of the DOCKER_BUILDKIT environment variable is unchanged; for CLI.BuildKitEnabled, DOCKER_BUILDKIT always takes precedence, and for processBuilder the value is taken into account, but will print a warning when BuildKit is disabled and a Linux daemon is used. For Windows daemons, no warning is printed. [moby@7b153b9]:7b153b9e28Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Docker CLI
About
This repository is the home of the Docker CLI.
Development
docker/cli is developed using Docker.
Build CLI from source:
docker buildx bake
Build binaries for all supported platforms:
docker buildx bake cross
Build for a specific platform:
docker buildx bake --set binary.platform=linux/arm64
Build dynamic binary for glibc or musl:
USE_GLIBC=1 docker buildx bake dynbinary
Run all linting:
docker buildx bake lint shellcheck
Run test:
docker buildx bake test
List all the available targets:
make help
In-container development environment
Start an interactive development environment:
make -f docker.Makefile shell
Legal
Brought to you courtesy of our legal counsel. For more context, see the NOTICE document in this repo.
Use and transfer of Docker may be subject to certain restrictions by the United States and other governments.
It is your responsibility to ensure that your use and/or transfer does not violate applicable laws.
For more information, see https://www.bis.doc.gov
Licensing
docker/cli is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.