Skip to content

Commit

Permalink
[close #207] cdc: modify ticdc dockerfile for tikv-cdc (#208)
Browse files Browse the repository at this point in the history
* modify dockerfile

Signed-off-by: zeminzhou <[email protected]>

* fix comment:

Signed-off-by: zeminzhou <[email protected]>

Signed-off-by: zeminzhou <[email protected]>
Co-authored-by: Ping Yu <[email protected]>
  • Loading branch information
zeminzhou and pingyu authored Aug 22, 2022
1 parent ff3a1f0 commit 1cb59c9
Show file tree
Hide file tree
Showing 17 changed files with 31 additions and 27 deletions.
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.

File renamed without changes.
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" ]

0 comments on commit 1cb59c9

Please sign in to comment.