forked from jitsucom/bulker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbulker.Dockerfile
More file actions
51 lines (33 loc) · 1.07 KB
/
bulker.Dockerfile
File metadata and controls
51 lines (33 loc) · 1.07 KB
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
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.21.0-bullseye as build
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 bulkerlib bulkerapp
COPY jitsubase/go.* ./jitsubase/
COPY bulkerlib/go.* ./bulkerlib/
COPY bulkerapp/go.* ./bulkerapp/
RUN go work init jitsubase bulkerlib bulkerapp
WORKDIR /app/bulkerapp
RUN go mod download
WORKDIR /app
COPY . .
# Build bulker
RUN go build -o bulker ./bulkerapp
#######################################
# FINAL STAGE
FROM main as final
RUN mkdir /app
WORKDIR /app
# Copy bulkerapp
COPY --from=build /app/bulker ./
#COPY ./config.yaml ./
CMD ["/app/bulker"]