File tree 4 files changed +45
-0
lines changed
4 files changed +45
-0
lines changed Original file line number Diff line number Diff line change
1
+ FROM golang:1.10.3-stretch
2
+
3
+ # Doing mostly what CI is doing here
4
+ RUN apt-get update && \
5
+ apt-get install -y apt-transport-https && \
6
+ apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 648A4A16A23015EEF4A66B8E4052245BD4284CDD && \
7
+ echo "deb https://repo.iovisor.org/apt/xenial xenial main" > /etc/apt/sources.list.d/iovisor.list && \
8
+ apt-get update && \
9
+ apt-get install -y libbcc=0.6.1-1 linux-headers-amd64
10
+
11
+ ENV GO_PACKAGE=github.com/cloudflare/ebpf_exporter
12
+
13
+ COPY ./ /go/src/$GO_PACKAGE
14
+
15
+ RUN go install -v $GO_PACKAGE/cmd/...
Original file line number Diff line number Diff line change
1
+ RELEASE := $(shell git describe --tags --always --dirty=-dev | sed s'/^v//g')
2
+
3
+ RELEASES_DIR := release
4
+
5
+ RELEASE_AMD64_DIR := ebpf_exporter-$(RELEASE )
6
+ RELEASE_AMD64_BINARY := $(RELEASES_DIR ) /$(RELEASE_AMD64_DIR ) /ebpf_exporter
7
+
8
+ .PHONY : release-binaries
9
+ release-binaries :
10
+ rm -rf $(RELEASES_DIR ) /*
11
+ mkdir -p $(RELEASES_DIR ) /$(RELEASE_AMD64_DIR )
12
+ docker build -t ebpf-exporter-build .
13
+ docker run --rm --entrypoint cat ebpf-exporter-build /go/bin/ebpf_exporter > $(RELEASE_AMD64_BINARY )
14
+ chmod +x $(RELEASE_AMD64_BINARY )
15
+ cd $(RELEASES_DIR ) && tar -czf $(RELEASE_AMD64_DIR ) .tar.gz $(RELEASE_AMD64_DIR )
16
+ cd $(RELEASES_DIR ) && shasum -a 256 * .tar.gz > sha256sums.txt
Original file line number Diff line number Diff line change @@ -29,6 +29,18 @@ To build, you need to have `libbcc` installed:
29
29
30
30
* https://github.com/iovisor/bcc/blob/master/INSTALL.md
31
31
32
+ You can use pre-compiled binary from Releases:
33
+
34
+ * https://github.com/cloudflare/ebpf_exporter/releases
35
+
36
+ That still requires you to have ` libbcc ` . To build release binaries yourself:
37
+
38
+ ```
39
+ $ make release-binaries
40
+ ```
41
+
42
+ To build a package from latest sources:
43
+
32
44
```
33
45
$ mkdir /tmp/ebpf_exporter
34
46
$ cd /tmp/ebpf_exporter
Original file line number Diff line number Diff line change
1
+ /*
2
+ ! /.gitignore
You can’t perform that action at this time.
0 commit comments