-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
package/docker-cli-buildx: new package
buildx is a docker CLI plugin implementing extended build features. buildx is the default builder as of Docker v23.x, and if the plugin is not present, the CLI will output an error warning that it is using the deprecated built-in builder instead of the buildx builder. However, buildx is a separate repository from docker-cli: it is a plugin that needs to be installed at /usr/lib/docker/cli-plugins on the target. https://github.com/docker/buildx Signed-off-by: Christian Stewart <christian@aperture.us> --- v1 -> v2: - buildx: bump version to v0.11.1 - https://github.com/docker/buildx/releases/tag/v0.11.1 - NOTE: docker-cli-buildx requires language features from go1.20! - Depends on bump to go1.20.x: - https://patchwork.ozlabs.org/project/buildroot/patch/20230711220849.1702358-3-christian@aperture.us/ v2 -> v3: - Rename bin from buildx to docker-buildx (fixes docker cli not finding it) - update docker-cli-buildx to v0.11.2 - https://github.com/docker/buildx/releases/tag/v0.11.2 Signed-off-by: Christian Stewart <christian@aperture.us>
- Loading branch information
Showing
4 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
config BR2_PACKAGE_DOCKER_CLI_BUILDX | ||
bool "docker-cli-buildx" | ||
depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS | ||
depends on BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS | ||
depends on BR2_TOOLCHAIN_HAS_THREADS | ||
select BR2_PACKAGE_DOCKER_CLI | ||
help | ||
buildx is a Docker CLI plugin for extended build | ||
capabilities with BuildKit. | ||
|
||
https://github.com/docker/buildx | ||
|
||
comment "docker-cli-buildx needs a toolchain w/ threads" | ||
depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS | ||
depends on BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS | ||
depends on !BR2_TOOLCHAIN_HAS_THREADS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Locally calculated | ||
sha256 371eb742213ed580179fc4fdfd9a197f0e3115e91979b7907828427d578d49e5 docker-cli-buildx-0.11.2.tar.gz | ||
sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 LICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
################################################################################ | ||
# | ||
# docker-cli-buildx | ||
# | ||
################################################################################ | ||
|
||
DOCKER_CLI_BUILDX_VERSION = 0.11.2 | ||
DOCKER_CLI_BUILDX_SITE = $(call github,docker,buildx,v$(DOCKER_CLI_BUILDX_VERSION)) | ||
|
||
DOCKER_CLI_BUILDX_LICENSE = Apache-2.0 | ||
DOCKER_CLI_BUILDX_LICENSE_FILES = LICENSE | ||
|
||
DOCKER_CLI_BUILDX_DEPENDENCIES = host-pkgconf | ||
|
||
DOCKER_CLI_BUILDX_BUILD_TARGETS = cmd/buildx | ||
DOCKER_CLI_BUILDX_GOMOD = github.com/docker/buildx | ||
|
||
DOCKER_CLI_BUILDX_LDFLAGS = \ | ||
-X $(DOCKER_CLI_BUILDX_GOMOD)/version.Revision=$(DOCKER_CLI_BUILDX_VERSION) \ | ||
-X $(DOCKER_CLI_BUILDX_GOMOD)/version.Version=$(DOCKER_CLI_BUILDX_VERSION) | ||
|
||
# create the go.mod file with required language version go1.20 | ||
# remove the conflicting vendor/modules.txt | ||
# https://github.com/moby/moby/issues/44618#issuecomment-1343565705 | ||
define DOCKER_CLI_BUILDX_FIX_VENDORING | ||
printf "module $(DOCKER_CLI_BUILDX_GOMOD)\n\ngo 1.20\n" > $(@D)/go.mod | ||
rm -f $(@D)/vendor/modules.txt | ||
endef | ||
DOCKER_CLI_BUILDX_POST_EXTRACT_HOOKS += DOCKER_CLI_BUILDX_FIX_VENDORING | ||
|
||
define DOCKER_CLI_BUILDX_INSTALL_TARGET_CMDS | ||
$(INSTALL) -m 0755 -D $(@D)/bin/buildx \ | ||
$(TARGET_DIR)/usr/lib/docker/cli-plugins/docker-buildx | ||
endef | ||
|
||
$(eval $(golang-package)) |