-
Notifications
You must be signed in to change notification settings - Fork 21
/
all.Dockerfile
79 lines (53 loc) · 2.4 KB
/
all.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
FROM debian:bookworm-slim as base
RUN apt-get update -y
RUN apt-get install -y ca-certificates curl
ENV TZ=UTC
WORKDIR /app
FROM golang:1.23.1-bookworm as builder
ARG VERSION
ENV VERSION $VERSION
ARG BUILD_TIMESTAMP
ENV BUILD_TIMESTAMP $BUILD_TIMESTAMP
RUN apt-get install gcc libc6-dev
WORKDIR /app
RUN mkdir jitsubase kafkabase eventslog bulkerlib bulkerapp ingest sync-sidecar sync-controller ingress-manager admin
RUN mkdir connectors connectors/airbytecdk connectors/firebase
COPY jitsubase/go.* ./jitsubase/
COPY kafkabase/go.* ./kafkabase/
COPY eventslog/go.* ./eventslog/
COPY bulkerlib/go.* ./bulkerlib/
COPY bulkerapp/go.* ./bulkerapp/
COPY ingest/go.* ./ingest/
COPY sync-sidecar/go.* ./sync-sidecar/
COPY sync-controller/go.* ./sync-controller/
COPY ingress-manager/go.* ./ingress-manager/
COPY admin/go.* ./admin/
COPY connectors/airbytecdk/go.* ./connectors/airbytecdk/
COPY connectors/firebase/go.* ./connectors/firebase/
COPY go.work ./go.work
COPY go.work.sum ./go.work.sum
#RUN go work init jitsubase kafkabase eventslog bulkerlib bulkerapp ingest sync-sidecar sync-controller
RUN --mount=type=cache,id=go_mod,mode=0755,target=/go/pkg/mod go mod download
WORKDIR /app
COPY . .
ENV GOEXPERIMENT loopvar
RUN --mount=type=cache,id=go_mod,mode=0755,target=/go/pkg/mod go build -ldflags="-X main.Commit=$VERSION -X main.Timestamp=$BUILD_TIMESTAMP" -o bulker ./bulkerapp
RUN --mount=type=cache,id=go_mod,mode=0755,target=/go/pkg/mod go build -ldflags="-X main.Commit=$VERSION -X main.Timestamp=$BUILD_TIMESTAMP" -o ingest ./ingest
RUN --mount=type=cache,id=go_mod,mode=0755,target=/go/pkg/mod go build -ldflags="-X main.Commit=$VERSION -X main.Timestamp=$BUILD_TIMESTAMP" -o sidecar ./sync-sidecar
RUN --mount=type=cache,id=go_mod,mode=0755,target=/go/pkg/mod go build -ldflags="-X main.Commit=$VERSION -X main.Timestamp=$BUILD_TIMESTAMP" -o syncctl ./sync-controller
RUN --mount=type=cache,id=go_mod,mode=0755,target=/go/pkg/mod go build -ldflags="-X main.Commit=$VERSION -X main.Timestamp=$BUILD_TIMESTAMP" -o ingmgr ./ingress-manager
FROM base as bulker
COPY --from=builder /app/bulker ./
CMD ["/app/bulker"]
FROM base as ingest
COPY --from=builder /app/ingest/ingest ./
CMD ["/app/ingest"]
FROM base as sidecar
COPY --from=builder /app/sidecar ./
CMD ["/app/sidecar"]
FROM base as syncctl
COPY --from=builder /app/syncctl ./
CMD ["/app/syncctl"]
FROM base as ingmgr
COPY --from=builder /app/ingmgr ./
CMD ["/app/ingmgr"]