https://hub.docker.com/r/pingcap/pd
https://www.github.com/pingcap/pd
https://pingcap.com/docs-cn/stable/reference/tools/pd-control/
https://hub.docker.com/_/golang
https://github.com/stedolan/jq/releases/
cd /data/docker/tools/Dockerfile/tidb/pd
docker build -t pd .
docker tag pd:latest hub.htmltoo.com:5000/tidb:pd
docker push hub.htmltoo.com:5000/tidb:pd
Dockerfile
FROM golang:1.14.2-alpine3.11 as builder
MAINTAINER siddontang
RUN apk add --no-cache \
make \
git \
bash \
curl \
gcc \
g++
# Install jq for pd-ctl
RUN cd / && \
wget https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 -O jq && \
chmod +x jq
RUN mkdir -p /go/src/github.com/pingcap/pd
WORKDIR /go/src/github.com/pingcap/pd
# Cache dependencies
COPY go.mod .
COPY go.sum .
RUN GO111MODULE=on go mod download
COPY . .
RUN make
FROM alpine:latest
RUN apk update && apk upgrade
RUN apk --update --no-cache add net-tools git curl axel wget vim make bash gcc g++
RUN apk --update --no-cache add unzip zip geoip cmake autoconf automake libtool supervisor
RUN apk update && apk upgrade
COPY --from=builder /go/src/github.com/pingcap/pd/bin/pd-server /pd-server
COPY --from=builder /go/src/github.com/pingcap/pd/bin/pd-ctl /pd-ctl
COPY --from=builder /jq /usr/local/bin/jq
EXPOSE 2379 2380
ENTRYPOINT ["/pd-server"]
签名:这个人很懒,什么也没有留下!