-
Notifications
You must be signed in to change notification settings - Fork 21
/
syncctl.Dockerfile
54 lines (34 loc) · 1.21 KB
/
syncctl.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
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.1-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 sync-controller sync-sidecar
COPY jitsubase/go.* ./jitsubase/
COPY bulkerlib/go.* ./bulkerlib/
COPY bulkerapp/go.* ./bulkerapp/
COPY sync-controller/go.* ./sync-controller/
COPY sync-sidecar/go.* ./sync-sidecar/
RUN go work init jitsubase bulkerlib bulkerapp sync-controller sync-sidecar
WORKDIR /app/sync-controller
RUN go mod download
WORKDIR /app
COPY . .
# Build bulker
RUN go build -o syncctl ./sync-controller
#######################################
# FINAL STAGE
FROM main as final
RUN mkdir /app
WORKDIR /app
COPY --from=build /app/syncctl ./
#COPY ./config.yaml ./
CMD ["/app/syncctl"]