-
Notifications
You must be signed in to change notification settings - Fork 15
/
Makefile
34 lines (26 loc) · 960 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
31
32
33
34
CONNTRACK_EXPORTER_VERSION = 0.3.1
build:
bazel build -c dbg //:conntrack_exporter
cp -f bazel-bin/conntrack_exporter .
build_stripped:
bazel build --strip=always -c opt //:conntrack_exporter
cp -f bazel-bin/conntrack_exporter .
# May need to run make via sudo for this:
run:
./conntrack_exporter
build_docker:
docker build -t hiveco/conntrack_exporter:$(CONNTRACK_EXPORTER_VERSION) --target release .
run_docker: build_docker
docker run -it --rm \
--cap-add=NET_ADMIN \
--name=conntrack_exporter \
--net=host \
hiveco/conntrack_exporter:$(CONNTRACK_EXPORTER_VERSION)
publish_docker: build_docker
docker tag hiveco/conntrack_exporter:$(CONNTRACK_EXPORTER_VERSION) hiveco/conntrack_exporter:latest
docker push hiveco/conntrack_exporter:$(CONNTRACK_EXPORTER_VERSION)
docker push hiveco/conntrack_exporter:latest
clean:
bazel clean
rm -f conntrack_exporter
.PHONY: build build_stripped run build_docker run_docker publish_docker clean