Add the flags --list-targets and --list-variables to the cases
where initializing the builder can be skipped.
This allows the listing of targets and variables
when no builder is available.
Resolves: docker/buildx#2755
Signed-off-by: Tim Neumann <git@neumann-tim.de>
When run in standalone mode, the environment variables
`DOCKER_BUILDX_CPU_PROFILE` and `DOCKER_BUILDX_MEM_PROFILE` will cause
profiles to be written by the CLI.
Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
Touch-up the security policy to make the OpenSSF scorecard
slightly happier;
https://securityscorecards.dev/viewer/?uri=github.com/docker/buildx
Warn: One or no descriptive hints of disclosure, vulnerability, and/or timelines in security policy
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Integrates vtproto into buildx. The generated files dockerfile has been
modified to copy the buildkit equivalent file to ensure files are laid
out in the appropriate way for imports.
An import has also been included to change the grpc codec to the version
in buildkit that supports vtproto. This will allow buildx to utilize the
speed and memory improvements from that.
Also updates the gc control options for prune.
Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
Similar to https://github.com/docker/buildx/pull/2716.
Use the file size rather than the proto size, raise the allowed limit to
the same value for consistency, and improve the error message to include
the limit in human units.
Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
Raise the maximum size limit for the dockerfile and correct the size
check. The size check was intended to use the size attribute from the
file stat, but the original gogo version confused the `Size()`
method (which returned the size of the proto message) with the `Size`
attribute (which was named `Size_`).
During the conversion, we noticed the mistake but kept the incorrect
behavior for the sake of keeping the conversion simple.
This also raises the maximum limit because 512 kB is likely a bit too
conservative. The limit has been raised to 2 MB and the limit has been
included in the error message.
Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
Removes gogo/protobuf from buildx and updates to a version of
moby/buildkit where gogo is removed.
This also changes how the proto files are generated. This is because
newer versions of protobuf are more strict about name conflicts. If two
files have the same name (even if they are relative paths) and are used
in different protoc commands, they'll conflict in the registry.
Since protobuf file generation doesn't work very well with
`paths=source_relative`, this removes the `go:generate` expression and
just relies on the dockerfile to perform the generation.
Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>