Skip to content

Commit

Permalink
build docker buildx
Browse files Browse the repository at this point in the history
  • Loading branch information
spowelljr committed Mar 29, 2024
1 parent 17529b9 commit 340eb43
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,32 @@

DOCKER_BUILDX_AARCH64_VERSION = v0.13.1
DOCKER_BUILDX_AARCH64_COMMIT = 788433953af10f2a698f5c07611dddce2e08c7a0
DOCKER_BUILDX_AARCH64_SITE = https://github.com/docker/buildx/archive
DOCKER_BUILDX_AARCH64_SOURCE = $(DOCKER_BUILDX_AARCH64_VERSION).tar.gz
DOCKER_BUILDX_AARCH64_GOPATH = $(@D)/_output
DOCKER_BUILDX_AARCH64_ENV = \
$(GO_TARGET_ENV) \
CGO_ENABLED=1 \
GO111MODULE=off \
GOPATH="$(DOCKER_BUILDX_AARCH64_GOPATH)" \
GOBIN="$(DOCKER_BUILDX_AARCH64_GOPATH)/bin" \
PATH=$(DOCKER_BUILDX_AARCH64_GOPATH)/bin:$(BR_PATH) \
GOARCH=arm64

DOCKER_BUILDX_AARCH64_COMPILE_SRC = $(DOCKER_BUILDX_AARCH64_GOPATH)/src/github.com/docker/buildx

define DOCKER_BUILDX_AARCH64_CONFIGURE_CMDS
mkdir -p $(TARGET_DIR)/usr/libexec/docker/cli-plugins
endef

define DOCKER_BUILDX_AARCH64_BUILD_CMDS
PWD=$(DOCKER_BUILDX_AARCH64_COMPILE_SRC) $(DOCKER_BUILDX_AARCH64_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) VERSION=$(DOCKER_BUILDX_AARCH64_VERSION) REVISION=$(DOCKER_BUILDX_AARCH64_COMMIT) -C $(@D) build
endef

define DOCKER_BUILDX_AARCH64_INSTALL_TARGET_CMDS
curl -Lo $(TARGET_DIR)/usr/libexec/docker/cli-plugins/docker-buildx https://github.com/docker/buildx/releases/download/$(DOCKER_BUILDX_AARCH64_VERSION)/buildx-$(DOCKER_BUILDX_AARCH64_VERSION).linux-arm64
chmod 0755 $(TARGET_DIR)/usr/libexec/docker/cli-plugins/docker-buildx
$(INSTALL) -Dm755 \
$(@D)/bin/build/docker-buildx \
$(TARGET_DIR)/usr/libexec/docker/cli-plugins/docker-buildx
endef

$(eval $(generic-package))
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,32 @@

DOCKER_BUILDX_VERSION = v0.13.1
DOCKER_BUILDX_COMMIT = 788433953af10f2a698f5c07611dddce2e08c7a0
DOCKER_BUILDX_SITE = https://github.com/docker/buildx/archive
DOCKER_BUILDX_SOURCE = $(DOCKER_BUILDX_VERSION).tar.gz
DOCKER_BUILDX_GOPATH = $(@D)/_output
DOCKER_BUILDX_ENV = \
$(GO_TARGET_ENV) \
CGO_ENABLED=1 \
GO111MODULE=off \
GOPATH="$(DOCKER_BUILDX_GOPATH)" \
GOBIN="$(DOCKER_BUILDX_GOPATH)/bin" \
PATH=$(DOCKER_BUILDX_GOPATH)/bin:$(BR_PATH) \
GOARCH=amd64

DOCKER_BUILDX_COMPILE_SRC = $(DOCKER_BUILDX_GOPATH)/src/github.com/docker/buildx

define DOCKER_BUILDX_CONFIGURE_CMDS
mkdir -p $(TARGET_DIR)/usr/libexec/docker/cli-plugins
endef

define DOCKER_BUILDX_BUILD_CMDS
PWD=$(DOCKER_BUILDX_COMPILE_SRC) $(DOCKER_BUILDX_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) VERSION=$(DOCKER_BUILDX_VERSION) REVISION=$(DOCKER_BUILDX_COMMIT) -C $(@D) build
endef

define DOCKER_BUILDX_INSTALL_TARGET_CMDS
curl -Lo $(TARGET_DIR)/usr/libexec/docker/cli-plugins/docker-buildx https://github.com/docker/buildx/releases/download/$(DOCKER_BUILDX_VERSION)/buildx-$(DOCKER_BUILDX_VERSION).linux-amd64
chmod 0755 $(TARGET_DIR)/usr/libexec/docker/cli-plugins/docker-buildx
$(INSTALL) -Dm755 \
$(@D)/bin/build/docker-buildx \
$(TARGET_DIR)/usr/libexec/docker/cli-plugins/docker-buildx
endef

$(eval $(generic-package))

0 comments on commit 340eb43

Please sign in to comment.