forked from pingcap/go-ycsb
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (19 loc) · 709 Bytes
/
Dockerfile
File metadata and controls
32 lines (19 loc) · 709 Bytes
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
FROM golang:1.16.7-alpine3.14
ENV GOPATH /go
RUN apk update && apk upgrade && \
apk add --no-cache git build-base wget
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
RUN mkdir -p /go/src/github.com/pingcap/go-ycsb
WORKDIR /go/src/github.com/pingcap/go-ycsb
COPY go.mod .
COPY go.sum .
RUN GO111MODULE=on go mod download
COPY . .
RUN GO111MODULE=on go build -o /go-ycsb ./cmd/*
FROM alpine:3.8
COPY --from=0 /go-ycsb /go-ycsb
COPY --from=0 /usr/local/bin/dumb-init /usr/local/bin/dumb-init
ADD workloads /workloads
EXPOSE 6060
ENTRYPOINT [ "/usr/local/bin/dumb-init", "/go-ycsb" ]