-
Notifications
You must be signed in to change notification settings - Fork 9
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 #36 from bloxapp/bulk_validators_refactors_2
Bulk Validators Refactors #2
- Loading branch information
Showing
16 changed files
with
130 additions
and
115 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
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
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 |
---|---|---|
@@ -1,15 +1,34 @@ | ||
FROM golang:1.20-alpine3.17 | ||
RUN apk add build-base | ||
FROM golang:1.20-alpine3.18 as build | ||
WORKDIR /ssv-dkg | ||
|
||
WORKDIR / | ||
# Install build dependencies required for CGO | ||
RUN apk add --no-cache musl-dev gcc g++ libstdc++ | ||
|
||
# Copy the go.mod and go.sum first and download the dependencies. | ||
# This layer will be cached unless these files change. | ||
COPY go.mod go.sum ./ | ||
RUN go mod download && go mod verify | ||
RUN --mount=type=cache,target=/root/.cache/go-build \ | ||
--mount=type=cache,mode=0755,target=/go/pkg \ | ||
go mod download | ||
|
||
COPY ./ ./ | ||
# Copy the rest of the source code | ||
COPY . . | ||
|
||
# Build | ||
RUN CGO_ENABLED=1 GOOS=linux go build -o /app /cmd/ssv-dkg/ssv-dkg.go | ||
# Build the binary with caching | ||
ENV CGO_ENABLED=1 | ||
RUN --mount=type=cache,target=/root/.cache/go-build \ | ||
--mount=type=cache,mode=0755,target=/go/pkg \ | ||
go build -o /bin/ssv-dkg ./cmd/ssv-dkg | ||
|
||
# | ||
# Run stage. | ||
# | ||
FROM alpine:3.18 | ||
WORKDIR /ssv-dkg | ||
|
||
EXPOSE 3030 | ||
# Copy the built binary from the previous stage | ||
COPY --from=build /bin/ssv-dkg /bin/ssv-dkg | ||
|
||
ENTRYPOINT ["/bin/ssv-dkg"] | ||
|
||
EXPOSE 3030 |
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
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
Oops, something went wrong.