Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

Commit

Permalink
add dockerfile (#397) (#466)
Browse files Browse the repository at this point in the history
  • Loading branch information
sre-bot authored Feb 4, 2020
1 parent ddfd7de commit 346d0f1
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
FROM golang:1.13-alpine as builder
MAINTAINER siddontang

RUN apk add --no-cache \
git make wget

RUN wget http://download.pingcap.org/tidb-enterprise-tools-latest-linux-amd64.tar.gz && \
tar -xzf tidb-enterprise-tools-latest-linux-amd64.tar.gz && \
mv tidb-enterprise-tools-latest-linux-amd64 /opt/tools

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 make dm-worker dm-master dm-tracer dmctl

FROM alpine:3.10

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/dm-tracer /dm-tracer
COPY --from=builder /go/src/github.com/pingcap/dm/bin/dmctl /dmctl
COPY --from=builder /opt/tools/bin/mydumper /mydumper

EXPOSE 8291 8261 8262

0 comments on commit 346d0f1

Please sign in to comment.