-
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
Showing
22 changed files
with
527 additions
and
406 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,40 @@ | ||
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/near-light-client/default.toml | ||
|
||
ENV NEAR_LIGHT_CLIENT_DIR=/var/near-light-client/ | ||
|
||
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
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.