-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
33 lines (23 loc) · 969 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
FROM golang:1.15-buster AS builder
MAINTAINER Hector Sanjuan <hector@protocol.ai>
ENV GOPATH /go
ENV SRC_PATH $GOPATH/src/github.com/filecoin-project/sentinel-tick
ENV GO111MODULE on
ENV GOPROXY https://proxy.golang.org
RUN apt-get update && apt-get install -y ca-certificates
COPY go.* $SRC_PATH/
WORKDIR $SRC_PATH
RUN go mod download
COPY . $SRC_PATH
RUN go install -trimpath -mod=readonly -ldflags "-X main.tag=$(git describe)"
#-------------------------------------------------------------------
#------------------------------------------------------
FROM busybox:1-glibc
MAINTAINER Hector Sanjuan <hector@protocol.ai>
ENV GOPATH /go
ENV SRC_PATH $GOPATH/src/github.com/filecoin-project/sentinel-tick
COPY --from=builder $GOPATH/bin/sentinel-tick /usr/local/bin/sentinel-tick
COPY --from=builder /etc/ssl/certs /etc/ssl/certs
ENTRYPOINT ["/usr/local/bin/sentinel-tick"]
# Defaults for ipfs-cluster-service go here
CMD [""]