-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
37 lines (26 loc) · 795 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
33
34
35
36
37
FROM golang:1.19-alpine as builder
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/tikv/pd
WORKDIR /go/src/github.com/tikv/pd
# Cache dependencies
COPY go.mod .
COPY go.sum .
RUN GO111MODULE=on go mod download
COPY . .
# RUN make
RUN GOOS=linux go build -o ./autoscale/autoscale tools/tiflash-autoscale/main.go
# FROM alpine:3.5
# COPY --from=builder /go/src/github.com/tikv/pd/autoscale/k8splayground /autoscale
RUN cp /go/src/github.com/tikv/pd/autoscale/autoscale /autoscale
EXPOSE 1-65535
ENTRYPOINT ["/bin/sh", "-c", "/autoscale > /var/log/autoscale_std.log"]