@@ -2,6 +2,8 @@ include ../common.mk
2
2
3
3
CLI_DIR =$(realpath $(CURDIR ) /../src/github.com/docker/cli)
4
4
ENGINE_DIR =$(realpath $(CURDIR ) /../src/github.com/docker/docker)
5
+ BUILDX_DIR =$(realpath $(CURDIR ) /../src/github.com/docker/buildx)
6
+
5
7
GEN_STATIC_VER =$(shell ./gen-static-ver $(CLI_DIR ) $(VERSION ) )
6
8
HASH_CMD =docker run -v $(CURDIR ) :/sum -w /sum debian:jessie bash hash_files
7
9
DIR_TO_HASH: =build/linux
@@ -40,7 +42,7 @@ clean: ## remove build artifacts
40
42
static : static-linux cross-mac cross-win cross-arm # # create all static packages
41
43
42
44
.PHONY : static-linux
43
- static-linux : static-cli static-engine # # create tgz with linux x86_64 client and server
45
+ static-linux : static-cli static-engine static-buildx-plugin # # create tgz
44
46
mkdir -p build/linux/docker
45
47
cp $(CLI_DIR ) /build/docker build/linux/docker/
46
48
for f in dockerd containerd ctr containerd-shim containerd-shim-runc-v2 docker-init docker-proxy runc; do \
@@ -57,6 +59,9 @@ static-linux: static-cli static-engine ## create tgz with linux x86_64 client an
57
59
done
58
60
tar -C build/linux -c -z -f build/linux/docker-rootless-extras-$(GEN_STATIC_VER).tgz docker-rootless-extras
59
61
62
+ # buildx
63
+ tar -C $(BUILDX_DIR)/bin -c -z -f build/linux/docker-buildx-plugin-$(DOCKER_BUILDX_REF:v%=%).tgz docker-buildx
64
+
60
65
.PHONY : hash_files
61
66
hash_files :
62
67
@echo " Hashing directory $( DIR_TO_HASH) "
@@ -100,6 +105,10 @@ static-cli:
100
105
static-engine :
101
106
$(MAKE ) -C $(ENGINE_DIR ) VERSION=$(GEN_STATIC_VER ) DOCKER_BUILD_OPTS=" $( DOCKER_BUILD_OPTS) " binary
102
107
108
+ .PHONY : static-buildx-plugin
109
+ static-buildx-plugin :
110
+ cd $(BUILDX_DIR ) && docker buildx bake --set binaries.platform=$(TARGETPLATFORM ) binaries && mv ./bin/buildx ./bin/docker-buildx
111
+
103
112
.PHONY : cross-all-cli
104
113
cross-all-cli :
105
114
$(MAKE ) -C $(CLI_DIR ) -f docker.Makefile VERSION=$(GEN_STATIC_VER ) cross
0 commit comments