forked from rancher/agent
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
49 lines (43 loc) · 1.24 KB
/
Copy pathMakefile
File metadata and controls
49 lines (43 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
PACKAGE_IMAGE_TARGET := package-image
TARGETS := $(filter-out $(PACKAGE_IMAGE_TARGET),$(shell ls scripts))
DAPPER_IMAGE ?= pasturestack-node-agent-dapper:ubuntu26
DAPPER_SOURCE ?= /go/src/github.com/PastureStack/node-agent
.dapper-image: Dockerfile.dapper
docker build \
--network "$${DOCKER_BUILD_NETWORK:-host}" \
--build-arg DAPPER_HOST_ARCH=$${DAPPER_HOST_ARCH:-amd64} \
-t $(DAPPER_IMAGE) \
-f Dockerfile.dapper .
$(TARGETS): .dapper-image
docker run --rm \
--privileged \
--cgroupns=host \
-v $(CURDIR):$(DAPPER_SOURCE) \
-e DAPPER_UID=$$(id -u) \
-e DAPPER_GID=$$(id -g) \
-e ARCH=$${ARCH:-amd64} \
-e DOCKER_BUILD_NETWORK \
-e TAG \
-e REPO \
-e CROSS \
-e VERSION_OVERRIDE \
-e NO_TEST \
-e TEST_BUSYBOX_IMAGE \
-e TEST_BUSYBOX_ALIAS \
$(DAPPER_IMAGE) $@
$(PACKAGE_IMAGE_TARGET): .dapper-image
docker run --rm \
-v $(CURDIR):$(DAPPER_SOURCE) \
-v /var/run/docker.sock:/var/run/docker.sock \
-e DAPPER_UID=$$(id -u) \
-e DAPPER_GID=$$(id -g) \
-e ARCH=$${ARCH:-amd64} \
-e DOCKER_BUILD_NETWORK \
-e TAG \
-e IMAGE_NAME \
-e VERSION_OVERRIDE \
$(DAPPER_IMAGE) $@
deps:
@echo "Dependencies are vendored; no external dependency fetch is required."
.DEFAULT_GOAL := ci
.PHONY: $(TARGETS) deps