Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[close #207] cdc: modify ticdc dockerfile for tikv-cdc #208

Merged
merged 3 commits into from
Aug 22, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions cdc/deployments/ticdc/docker/Dockerfile

This file was deleted.

15 changes: 0 additions & 15 deletions cdc/deployments/ticdc/docker/dev.Dockerfile

This file was deleted.

14 changes: 14 additions & 0 deletions cdc/deployments/tikv-cdc/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM golang:1.18.0-alpine3.15 as builder
RUN apk add --no-cache git make bash
WORKDIR /go/src/github.com/tikv/migration/cdc
COPY . .
ENV CDC_ENABLE_VENDOR=0
RUN make release

FROM alpine:3.15
RUN apk add --no-cache tzdata bash curl socat
COPY --from=builder /go/src/github.com/tikv/migration/cdc/bin/tikv-cdc /usr/bin/
# TiKV-CDC use TiCDC operator to run TiKV-CDC server, TiCDC operator will use '/cdc' to start server
COPY --from=builder /go/src/github.com/tikv/migration/cdc/bin/tikv-cdc /cdc
EXPOSE 8600
CMD [ "tikv-cdc" ]
17 changes: 17 additions & 0 deletions cdc/deployments/tikv-cdc/docker/dev.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM golang:1.18.0-alpine3.15 as builder
RUN apk add --no-cache git make bash
WORKDIR /go/src/github.com/tikv/migration/cdc
COPY . .
ENV CDC_ENABLE_VENDOR=1
RUN go mod vendor
RUN make failpoint-enable
RUN make
RUN make failpoint-disable

FROM alpine:3.15
RUN apk add --no-cache tzdata bash curl socat
COPY --from=builder /go/src/github.com/tikv/migration/cdc/bin/tikv-cdc /usr/bin/
# TiKV-CDC use TiCDC operator to run TiKV-CDC server, TiCDC operator will use '/cdc' to start server
COPY --from=builder /go/src/github.com/tikv/migration/cdc/bin/tikv-cdc /cdc
EXPOSE 8600
CMD [ "tikv-cdc" ]