-
Notifications
You must be signed in to change notification settings - Fork 3
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
dndll
committed
Mar 25, 2024
1 parent
f32adbe
commit 3944a40
Showing
21 changed files
with
522 additions
and
404 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
**target/ | ||
**direnv/ | ||
**vendor/ |
File renamed without changes.
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,38 @@ | ||
FROM --platform=$BUILDPLATFORM rust:1.72.0-bookworm as build | ||
ARG TARGETARCH | ||
|
||
WORKDIR /near | ||
|
||
COPY rust-toolchain.toml ./rust-toolchain.toml | ||
COPY Cargo.toml Cargo.lock ./ | ||
COPY nearx/contract near/contract | ||
|
||
RUN rustup show | ||
RUN apt-get update && apt-get install -y \ | ||
git \ | ||
jq \ | ||
make \ | ||
bash \ | ||
openssl \ | ||
libssl-dev \ | ||
protobuf-compiler \ | ||
pkg-config \ | ||
cbindgen | ||
|
||
RUN cargo new --bin bin/dummy | ||
RUN cargo new --lib crates/dummylib | ||
RUN cargo new --lib nearx | ||
RUN cargo build --release --config net.git-fetch-with-cli=true --bin dummy | ||
RUN rm -rf nearx bin crates | ||
|
||
COPY ./ ./ | ||
RUN cargo build --release --config net.git-fetch-with-cli=true --bin nearx-operator | ||
RUN ldd target/release/nearx-operator | ||
RUN cp target/release/nearx-operator /near/near-light-client | ||
|
||
FROM debian:bookworm-slim | ||
RUN apt-get update && apt-get install -y openssl libssl-dev pkg-config ca-certificates && rm -rf /var/lib/apt/lists/* | ||
COPY --from=build /near/target/release/nearx-operator /usr/local/bin | ||
COPY --from=build /near/default.toml /var/light-client.toml | ||
|
||
ENTRYPOINT ["/usr/local/bin/nearx-operator"] |
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.