Skip to content

Commit 93352cb

Browse files
committed
WIP add "binaries" target
Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 8ce5320 commit 93352cb

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

deb/Makefile

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ GO_BASE_IMAGE=golang
88
GO_IMAGE?=$(GO_BASE_IMAGE):$(GO_VERSION)-buster
99
GEN_DEB_VER=$(shell ./gen-deb-ver $(realpath $(CURDIR)/../src/github.com/docker/cli) "$(VERSION)")
1010
EPOCH?=5
11+
DOCKER_BUILDKIT=1
12+
BUILD_TARGET=final
1113

1214
ifdef BUILD_IMAGE
1315
BUILD_IMAGE_FLAG=--build-arg $(BUILD_IMAGE)
@@ -19,6 +21,11 @@ BUILD?=DOCKER_BUILDKIT=1 \
1921
$(BUILD_IMAGE_FLAG) \
2022
--build-arg GO_IMAGE=$(GO_IMAGE) \
2123
--build-arg COMMON_FILES=$(COMMON_FILES) \
24+
--build-arg VERSION=$(word 2, $(DEB_VERSION)) \
25+
--build-arg DOCKER_GITCOMMIT=$(GITCOMMIT) \
26+
--build-arg PLATFORM \
27+
--target=$(BUILD_TARGET) \
28+
$(BUILD_OPTS) \
2229
-t debbuild-$@/$(ARCH) \
2330
-f $@/Dockerfile \
2431
.
@@ -56,6 +63,12 @@ clean: ## remove build artifacts
5663
.PHONY: deb
5764
deb: ubuntu debian ## build all deb packages except for raspbian
5865

66+
.PHONY: binaries
67+
binaries: BUILD_TARGET=binaries
68+
binaries: BUILD_OPTS=--output type=local,dest=build
69+
binaries: deb
70+
71+
5972
.PHONY: ubuntu
6073
ubuntu: $(UBUNTU_VERSIONS) ## build all ubuntu deb packages
6174

@@ -69,8 +82,8 @@ raspbian: $(RASPBIAN_VERSIONS) ## build all raspbian deb packages
6982
$(DISTROS): sources/cli.tgz sources/engine.tgz sources/docker.service sources/docker.socket sources/plugin-installers.tgz
7083
@echo "== Building packages for $@ =="
7184
$(BUILD)
72-
$(RUN)
73-
$(CHOWN) -R $(shell id -u):$(shell id -g) debbuild/$@
85+
# $(RUN)
86+
# $(CHOWN) -R $(shell id -u):$(shell id -g) debbuild/$@
7487

7588
sources/engine.tgz:
7689
mkdir -p $(@D)

0 commit comments

Comments
 (0)