forked from FeatureBaseDB/featurebase
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-datagen
47 lines (29 loc) · 960 Bytes
/
Dockerfile-datagen
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
# syntax=docker/dockerfile:1
##########################
### datagen builder ###
##########################
FROM golang:alpine as builder
WORKDIR /featurebase
COPY . ./
RUN apk add --no-cache build-base bash git make librdkafka pkgconfig
# install librdkafka
RUN git clone https://github.com/edenhill/librdkafka.git
RUN cd librdkafka && ./configure --prefix /usr && make && make install
ENV PKG_CONFIG_PATH=/usr/lib/pkgconfig/
RUN cd idk && make build-datagen
# ENTRYPOINT ["tail", "-f", "/dev/null"]
#########################
### datagen runner ###
#########################
FROM alpine:3.15.3 as runner
WORKDIR /
LABEL maintainer "[email protected]"
RUN apk add --no-cache curl jq
COPY --from=builder /featurebase/idk/build/datagen /bin/
COPY --from=builder /usr/lib/librdkafka* /usr/lib/
COPY idk/datagen/testdata/* /testdata/
EXPOSE 8080
# VOLUME /data
# ENV ADDR 0.0.0.0:8080
#ENTRYPOINT ["sleep", "infinity"]
ENTRYPOINT ["datagen"]