Skip to content

Commit

Permalink
add br docker build
Browse files Browse the repository at this point in the history
Signed-off-by: haojinming <[email protected]>
  • Loading branch information
haojinming committed Oct 17, 2022
1 parent 92c5d1c commit f87545a
Showing 1 changed file with 7 additions and 24 deletions.
31 changes: 7 additions & 24 deletions br/deployments/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,27 +1,10 @@
# For loading data to TiDB
FROM golang:1.16.4-buster as go-ycsb-builder
WORKDIR /go/src/github.com/pingcap/
RUN git clone https://github.com/pingcap/go-ycsb.git --depth=1 && \
cd go-ycsb && \
make

# For operating minio S3 compatible storage
FROM minio/mc as mc-builder

FROM golang:1.16.4-buster

RUN apt-get update && apt-get install -y --no-install-recommends \
git \
curl \
vim \
less \
default-mysql-client \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /go/src/github.com/pingcap/br
FROM golang:1.18.0-alpine3.15 as builder
RUN apk add --no-cache git make bash
WORKDIR /go/src/github.com/tikv/migration/br
COPY . .
RUN make release

COPY --from=go-ycsb-builder /go/src/github.com/pingcap/go-ycsb/bin/go-ycsb /go/bin/go-ycsb
COPY --from=mc-builder /usr/bin/mc /usr/bin/mc

FROM alpine:3.15
RUN apk add --no-cache tzdata bash curl socat
COPY --from=builder /go/src/github.com/tikv/migration/br/bin/tikv-br /usr/bin/
ENTRYPOINT ["/bin/bash"]

0 comments on commit f87545a

Please sign in to comment.