Skip to content

Commit

Permalink
Update dockerfile (pingcap#8363)
Browse files Browse the repository at this point in the history
  • Loading branch information
gregwebs authored and yu34po committed Nov 22, 2018
1 parent 4746d72 commit 43d4cd8
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
# Builder image
FROM golang:1.10.1-alpine as builder
FROM golang:1.11.2-alpine as builder

RUN apk add --no-cache \
wget \
make \
git

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 \
&& chmod +x /usr/local/bin/dumb-init

COPY . /go/src/github.com/pingcap/tidb

WORKDIR /go/src/github.com/pingcap/tidb/
Expand All @@ -15,10 +19,13 @@ RUN make
FROM scratch

COPY --from=builder /go/src/github.com/pingcap/tidb/bin/tidb-server /tidb-server
COPY --from=builder /usr/local/bin/dumb-init /usr/local/bin/dumb-init



WORKDIR /

EXPOSE 4000

ENTRYPOINT ["/tidb-server"]
ENTRYPOINT ["/usr/local/bin/dumb-init", "/tidb-server"]

0 comments on commit 43d4cd8

Please sign in to comment.