-
Notifications
You must be signed in to change notification settings - Fork 721
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* use distroless.dev/static base image (#1648) * closes #1621 * run hermes commands as root (cherry picked from commit e011a10) # Conflicts: # Dockerfile # tests/e2e/e2e_test.go # tests/e2e/e2e_util_test.go * Fix merge conflicts * Set the version of Hermes to 0.12.0 * Resolved conflict with codeowners Co-authored-by: Nathan Dias <[email protected]> Co-authored-by: Milan Mulji <[email protected]>
- Loading branch information
1 parent
231ae5e
commit 050e402
Showing
5 changed files
with
28 additions
and
6 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,20 @@ | ||
ARG IMG_TAG=latest | ||
|
||
# Compile the gaiad binary | ||
FROM golang:1.18-alpine AS gaiad-builder | ||
WORKDIR /src/app/ | ||
COPY go.mod go.sum* ./ | ||
RUN go mod download | ||
COPY . . | ||
ENV PACKAGES curl make git libc-dev bash gcc linux-headers eudev-dev python3 | ||
RUN apk add --no-cache $PACKAGES | ||
RUN CGO_ENABLED=0 make install | ||
|
||
# Add to a distroless container | ||
FROM distroless.dev/static:$IMG_TAG | ||
ARG IMG_TAG | ||
COPY --from=gaiad-builder /go/bin/gaiad /usr/local/bin/ | ||
EXPOSE 26656 26657 1317 9090 | ||
USER 0 | ||
|
||
ENTRYPOINT ["gaiad", "start"] |
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
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