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 #263] Fix br docker build #264

Merged
merged 1 commit into from
Oct 18, 2022
Merged
Changes from all 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
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"]