forked from tokopedia/gripmock
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
47 lines (29 loc) · 947 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
38
39
40
41
42
43
44
45
46
47
FROM golang:alpine
RUN mkdir /proto
RUN mkdir /stubs
RUN apk -U --no-cache add git protobuf
RUN go get -u -v github.com/golang/protobuf/protoc-gen-go \
google.golang.org/grpc \
google.golang.org/grpc/reflection \
golang.org/x/net/context \
github.com/go-chi/chi \
github.com/lithammer/fuzzysearch/fuzzy \
golang.org/x/tools/imports
RUN go get github.com/markbates/pkger/cmd/pkger
# cloning well-known-types
RUN git clone https://github.com/google/protobuf.git /protobuf-repo
RUN mkdir protobuf
# only use needed files
RUN mv /protobuf-repo/src/ /protobuf/
RUN rm -rf /protobuf-repo
RUN mkdir -p /go/src/github.com/tokopedia/gripmock
COPY . /go/src/github.com/tokopedia/gripmock
WORKDIR /go/src/github.com/tokopedia/gripmock/protoc-gen-gripmock
RUN pkger
# install generator plugin
RUN go install -v
WORKDIR /go/src/github.com/tokopedia/gripmock
# install gripmock
RUN go install -v
EXPOSE 4770 4771
ENTRYPOINT ["gripmock"]