Skip to content

Commit

Permalink
add Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
NicknameID committed Feb 16, 2020
1 parent 5cd024f commit 5ef6b42
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM golang:1.13.8 as builder
WORKDIR /go/src/app
COPY . .
RUN CGO_ENABLED=0 make

FROM alpine:3.11.3
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories \
&& apk update \
&& apk add tzdata \
&& cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo "Asia/Shanghai" > /etc/timezone
RUN mkdir -p /etc/kingshard

COPY --from=builder /go/src/app/bin/kingshard /usr/local/bin/
COPY --from=builder /go/src/app/etc/ks.yaml /etc/kingshard/
CMD kingshard -config=/etc/kingshard/ks.yaml

0 comments on commit 5ef6b42

Please sign in to comment.