Skip to content

Commit 244d46b

Browse files
authored
Describe better build pattern (#59)
* "-tags static" makes the package re-distributable without requiring librdkafka on the receiving host * mention librdkafka requirement in build as well
1 parent 18e8765 commit 244d46b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ WORKDIR /src/prometheus-kafka-adapter
1010
ADD . /src/prometheus-kafka-adapter
1111

1212
RUN go test
13-
RUN go build -o /prometheus-kafka-adapter
13+
RUN go build -tags static -o /prometheus-kafka-adapter
1414

1515
FROM alpine:3.11
1616

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,11 @@ When deployed in a Kubernetes cluster using Helm and using an external Prometheu
7878

7979
## development
8080

81+
Building requires librdkafka be available on the building host. It is typically available in distribution package archives, but can also be downloaded and built from here: https://github.com/edenhill/librdkafka.git
82+
8183
```
8284
go test
83-
go build
85+
go build -tags static
8486
```
8587

8688
## contributing

0 commit comments

Comments
 (0)