-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
132 changed files
with
12,895 additions
and
10,428 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM golang:1.20.5-alpine as builder | ||
FROM golang:1.21.4-alpine as builder | ||
|
||
# Version to build. Default is the Git HEAD. | ||
ARG VERSION="HEAD" | ||
|
@@ -12,17 +12,13 @@ RUN apk add --no-cache --update openssh git make build-base linux-headers libc-d | |
libzmq-static libsodium-static gcc | ||
|
||
|
||
RUN mkdir -p /root/.ssh && ssh-keyscan github.com >> /root/.ssh/known_hosts | ||
RUN git config --global url."[email protected]:".insteadOf "https://github.com/" | ||
ENV GOPRIVATE=github.com/babylonchain/babylon-private | ||
|
||
# Build | ||
WORKDIR /go/src/github.com/babylonchain/btc-validator | ||
WORKDIR /go/src/github.com/babylonchain/finality-provider | ||
# Cache dependencies | ||
COPY go.mod go.sum /go/src/github.com/babylonchain/btc-validator/ | ||
RUN --mount=type=secret,id=sshKey,target=/root/.ssh/id_rsa go mod download | ||
COPY go.mod go.sum /go/src/github.com/babylonchain/finality-provider/ | ||
RUN go mod download | ||
# Copy the rest of the files | ||
COPY ./ /go/src/github.com/babylonchain/btc-validator/ | ||
COPY ./ /go/src/github.com/babylonchain/finality-provider/ | ||
|
||
# Cosmwasm - Download correct libwasmvm version | ||
RUN WASMVM_VERSION=$(go list -m github.com/CosmWasm/wasmvm | cut -d ' ' -f 2) && \ | ||
|
@@ -41,17 +37,14 @@ RUN CGO_LDFLAGS="$CGO_LDFLAGS -lstdc++ -lm -lsodium" \ | |
# FINAL IMAGE | ||
FROM alpine:3.16 AS run | ||
|
||
RUN addgroup --gid 1138 -S btcvalidator && adduser --uid 1138 -S btcvalidator -G btcvalidator | ||
RUN addgroup --gid 1138 -S finality-provider && adduser --uid 1138 -S finality-provider -G finality-provider | ||
|
||
RUN apk add bash curl jq | ||
|
||
COPY --from=builder /go/src/github.com/babylonchain/btc-validator/build/vald /bin/vald | ||
COPY --from=builder /go/src/github.com/babylonchain/btc-validator/build/valcli /bin/valcli | ||
|
||
WORKDIR /home/btcvalidator | ||
RUN chown -R btcvalidator /home/btcvalidator | ||
USER btcvalidator | ||
COPY --from=builder /go/src/github.com/babylonchain/finality-provider/build/fpd /bin/fpd | ||
COPY --from=builder /go/src/github.com/babylonchain/finality-provider/build/fpcli /bin/fpcli | ||
COPY --from=builder /go/src/github.com/babylonchain/finality-provider/build/eotsd /bin/eotsd | ||
|
||
ENTRYPOINT ["/bin/vald"] | ||
CMD [] | ||
STOPSIGNAL SIGTERM | ||
WORKDIR /home/finality-provider | ||
RUN chown -R finality-provider /home/finality-provider | ||
USER finality-provider |
Oops, something went wrong.