-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
30 lines (23 loc) · 849 Bytes
/
Makefile
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
IMAGE_TAG ?= latest
IMAGE = albinkerouanton006/iptables-tracer:$(IMAGE_TAG)
BUILD_OPTS =
ifdef BUILDER
BUILD_OPTS := --builder=${BUILDER}
endif
.PHONY: build
build:
docker build --platform linux/amd64,linux/arm64 --load ${BUILD_OPTS} -t ${IMAGE} --target=final .
.PHONY: push
push:
docker push $(IMAGE)
.PHONY: binary
binary: build
if [ ! -d bin/ ]; then mkdir bin; fi
docker run --rm -v $(shell pwd):/undock -w /undock crazymax/undock:latest \
--platform=linux/amd64 --include=/bin/iptables-tracer $(IMAGE) /undock
mv bin/iptables-tracer bin/iptables-tracer-amd64
docker run --rm -v $(shell pwd):/undock -w /undock crazymax/undock:latest \
--platform=linux/arm64 --include=/bin/iptables-tracer $(IMAGE) /undock
mv bin/iptables-tracer bin/iptables-tracer-arm64
install:
sudo cp bin/iptables-tracer /usr/local/sbin/iptables-tracer