forked from metaverse/truss
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
22 lines (15 loc) · 838 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# To run properly, the directory containing the proto files Truss will read to
# generate a service must be mounted into the container, so that the output
# generated by Truss escapes the container.
# Using scratch as a base image would result in a slightly smaller image,
# which would be fine if Truss were a self-contained executable, but protoc
# has difficulty running on a scratch image. Using Alpine Linux alleviates
# these issues and only increases image size by about 5 MB.
FROM golang:alpine3.12
LABEL maintainer="[email protected]"
RUN apk update && apk upgrade && apk add --no-cache protobuf git
RUN go version && go get -u -v github.com/gogo/protobuf/protoc-gen-gogofaster
COPY ./ $GOPATH/src/github.com/metaverse/truss
RUN go install -v github.com/metaverse/truss/...
WORKDIR /go/src/protos
ENTRYPOINT ["truss"]