forked from solarlabsteam/cosmos-exporter
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from stakefish/feat/remove-feature
add container CI and remove validator_delegation requests
- Loading branch information
Showing
4 changed files
with
77 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
FROM golang:1.18-alpine as builder | ||
|
||
RUN apk update && \ | ||
apk add --no-cache ca-certificates git && \ | ||
update-ca-certificates | ||
|
||
RUN adduser -D -g '' appuser | ||
|
||
WORKDIR /app | ||
|
||
ENV CGO_ENABLED=0 | ||
|
||
COPY go.mod . | ||
COPY go.sum . | ||
RUN go mod download | ||
RUN go mod verify | ||
|
||
COPY . . | ||
RUN go build -o /go/bin/cosmos-exporter -ldflags '-extldflags "-static"' | ||
|
||
# second step to build minimal image | ||
FROM scratch | ||
|
||
# add common trusted certificates from the build stage | ||
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ | ||
COPY --from=builder /etc/passwd /etc/passwd | ||
|
||
USER appuser | ||
|
||
COPY --from=builder /go/bin/cosmos-exporter /go/bin/cosmos-exporter | ||
|
||
ENTRYPOINT ["/go/bin/cosmos-exporter"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters