2022-04-22 12:31:57 +00:00
|
|
|
FROM golang:1.18-alpine as builder
|
|
|
|
|
2022-06-09 21:32:46 +00:00
|
|
|
WORKDIR /go/src/github.com/vulcanize/ipld-eth-beacon-indexer
|
2022-04-22 12:31:57 +00:00
|
|
|
RUN apk --no-cache add ca-certificates make git g++ linux-headers
|
|
|
|
|
|
|
|
ENV GO111MODULE=on
|
|
|
|
COPY go.mod .
|
|
|
|
COPY go.sum .
|
|
|
|
RUN go mod tidy; go mod download
|
|
|
|
COPY . .
|
|
|
|
|
2022-06-09 21:32:46 +00:00
|
|
|
RUN GCO_ENABLED=0 GOOS=linux go build -race -a -installsuffix cgo -ldflags '-extldflags "-static"' -o ipld-eth-beacon-indexer .
|
|
|
|
RUN chmod +x ipld-eth-beacon-indexer
|
2022-04-22 12:31:57 +00:00
|
|
|
|
|
|
|
FROM frolvlad/alpine-bash:latest
|
|
|
|
RUN apk --no-cache add ca-certificates
|
|
|
|
WORKDIR /root/
|
2022-06-09 21:32:46 +00:00
|
|
|
COPY --from=builder /go/src/github.com/vulcanize/ipld-eth-beacon-indexer/ipld-eth-beacon-indexer /root/ipld-eth-beacon-indexer
|
2022-04-22 12:31:57 +00:00
|
|
|
ADD entrypoint.sh .
|
|
|
|
ENTRYPOINT ["./entrypoint.sh"]
|