-
Notifications
You must be signed in to change notification settings - Fork 22
/
ingest.Dockerfile
57 lines (38 loc) · 1.26 KB
/
ingest.Dockerfile
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
48
49
50
51
52
53
54
55
56
57
FROM debian:bullseye-slim as main
RUN apt-get update -y
RUN apt-get install -y ca-certificates curl
ENV TZ=UTC
FROM golang:1.23.3-bullseye as build
ARG VERSION
ENV VERSION $VERSION
ARG BUILD_TIMESTAMP
ENV BUILD_TIMESTAMP $BUILD_TIMESTAMP
RUN apt-get install gcc libc6-dev
#RUN wget -qO - https://packages.confluent.io/deb/7.2/archive.key | apt-key add -
#RUN echo "deb https://packages.confluent.io/deb/7.2 stable main" > /etc/apt/sources.list.d/backports.list
#RUN echo "deb https://packages.confluent.io/clients/deb buster main" > /etc/apt/sources.list.d/backports.list
#RUN apt-get update
#RUN apt-get install -y librdkafka1 librdkafka-dev
RUN mkdir /app
WORKDIR /app
RUN mkdir jitsubase kafkabase eventslog ingest
COPY jitsubase/go.* ./jitsubase/
COPY kafkabase/go.* ./kafkabase/
COPY eventslog/go.* ./eventslog/
COPY ingest/go.* ./ingest/
RUN go work init jitsubase kafkabase eventslog ingest
WORKDIR /app/ingest
RUN go mod download
WORKDIR /app
COPY . .
# Build ingest
RUN go build -ldflags="-X main.Commit=$VERSION -X main.Timestamp=$BUILD_TIMESTAMP" -o ingest ./ingest
#######################################
# FINAL STAGE
FROM main as final
RUN mkdir /app
WORKDIR /app
# Copy ingest
COPY --from=build /app/ingest ./
#COPY ./config.yaml ./
CMD ["/app/ingest"]