Commit 54f9459 1 parent 54899f6 commit 54f9459 Copy full SHA for 54f9459
File tree 1 file changed +10
-3
lines changed
1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -11,10 +11,17 @@ RUN apk add --no-cache \
11
11
RUN wget -O /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_amd64 \
12
12
&& chmod +x /usr/local/bin/dumb-init
13
13
14
- COPY . /go/src/github.com/pingcap/tidb
14
+ RUN mkdir -p /go/src/github.com/pingcap/tidb
15
+ WORKDIR /go/src/github.com/pingcap/tidb
15
16
16
- WORKDIR /go/src/github.com/pingcap/tidb/
17
+ # Cache dependencies
18
+ COPY go.mod .
19
+ COPY go.sum .
17
20
21
+ RUN GO111MODULE=on go mod download
22
+
23
+ # Build real binaries
24
+ COPY . .
18
25
RUN make
19
26
20
27
# Executable image
@@ -27,4 +34,4 @@ WORKDIR /
27
34
28
35
EXPOSE 4000
29
36
30
- ENTRYPOINT ["/usr/local/bin/dumb-init" , "/tidb-server" ]
37
+ ENTRYPOINT ["/usr/local/bin/dumb-init" , "/tidb-server" ]
You can’t perform that action at this time.
0 commit comments