forked from pingcap/dm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
33 lines (21 loc) · 847 Bytes
/
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
FROM golang:1.16-alpine as builder
MAINTAINER siddontang
RUN apk add --no-cache git make
RUN mkdir -p /go/src/github.com/pingcap/dm
WORKDIR /go/src/github.com/pingcap/dm
# Cache dependencies
COPY go.mod .
COPY go.sum .
RUN GO111MODULE=on go mod download
COPY . .
RUN apk update && apk add bash
RUN make dm-worker dm-master dmctl
FROM alpine:3.10
# keep compatibility
COPY --from=builder /go/src/github.com/pingcap/dm/bin/dm-worker /dm-worker
COPY --from=builder /go/src/github.com/pingcap/dm/bin/dm-master /dm-master
COPY --from=builder /go/src/github.com/pingcap/dm/bin/dmctl /dmctl
COPY --from=builder /go/src/github.com/pingcap/dm/bin/dm-worker /bin/dm-worker
COPY --from=builder /go/src/github.com/pingcap/dm/bin/dm-master /bin/dm-master
COPY --from=builder /go/src/github.com/pingcap/dm/bin/dmctl /bin/dmctl
EXPOSE 8261 8262 8291