@@ -10,6 +10,8 @@ GO_IMAGE=$(GO_BASE_IMAGE):$(GO_VERSION)-stretch
10
10
DEB_VERSION =$(shell ./gen-deb-ver $(CLI_DIR ) "$(VERSION ) ")
11
11
CHOWN: =docker run --rm -v $(CURDIR ) :/v -w /v alpine chown
12
12
EPOCH? =5
13
+ DOCKER_BUILDKIT =1
14
+ BUILD_TARGET =final
13
15
14
16
ifdef BUILD_IMAGE
15
17
BUILD_IMAGE_FLAG=--build-arg $(BUILD_IMAGE)
@@ -20,6 +22,11 @@ BUILD?=docker build \
20
22
$(BUILD_IMAGE_FLAG ) \
21
23
--build-arg GO_IMAGE=$(GO_IMAGE ) \
22
24
--build-arg COMMON_FILES=$(COMMON_FILES ) \
25
+ --build-arg VERSION=$(word 2, $(DEB_VERSION ) ) \
26
+ --build-arg DOCKER_GITCOMMIT=$(GITCOMMIT ) \
27
+ --build-arg PLATFORM \
28
+ --target=$(BUILD_TARGET ) \
29
+ $(BUILD_OPTS ) \
23
30
-t debbuild-$@ /$(ARCH ) \
24
31
-f $(CURDIR ) /$@ /Dockerfile .
25
32
# Additional flags may be necessary at some point
@@ -61,6 +68,12 @@ engine-$(ARCH).tar:
61
68
.PHONY : deb
62
69
deb : ubuntu debian # # build all deb packages except for raspbian
63
70
71
+ .PHONY : binaries
72
+ binaries : BUILD_TARGET=binaries
73
+ binaries : BUILD_OPTS=--output type=local,dest=build
74
+ binaries : deb
75
+
76
+
64
77
.PHONY : ubuntu
65
78
ubuntu : $(UBUNTU_VERSIONS ) # # build all ubuntu deb packages
66
79
@@ -74,8 +87,8 @@ raspbian: $(RASPBIAN_VERSIONS) ## build all raspbian deb packages
74
87
$(DISTROS ) : $(SOURCES )
75
88
@echo " == Building packages for $@ =="
76
89
$(BUILD )
77
- $(RUN )
78
- $(CHOWN ) -R $(shell id -u) :$(shell id -g) debbuild/$@
90
+ # $(RUN)
91
+ # $(CHOWN) -R $(shell id -u):$(shell id -g) debbuild/$@
79
92
80
93
sources/engine.tgz :
81
94
mkdir -p $(@D )
0 commit comments