-
Notifications
You must be signed in to change notification settings - Fork 14
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
8 changed files
with
54 additions
and
9 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,3 +1,3 @@ | ||
target/ | ||
.git | ||
README.md | ||
README.md |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 +1,39 @@ | ||
FROM rust:1.75.0 AS chef-builder | ||
FROM debian:12 as build-env | ||
|
||
WORKDIR /src | ||
|
||
# Install dependencies | ||
RUN apt-get update && \ | ||
apt-get install -y \ | ||
curl build-essential \ | ||
libssl-dev texinfo \ | ||
libcap2-bin pkg-config | ||
|
||
# TODO: Use a specific version of rustup | ||
# Install rustup | ||
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y | ||
|
||
COPY . . | ||
|
||
# Set environment variables | ||
ENV PATH="/root/.cargo/bin:${PATH}" | ||
ENV RUSTUP_HOME="/root/.rustup" | ||
ENV CARGO_HOME="/root/.cargo" | ||
|
||
# Install the toolchain | ||
RUN rustup component add cargo | ||
|
||
# Build the binary | ||
RUN cargo fetch | ||
RUN cargo build --release --no-default-features | ||
|
||
# Make sure it runs | ||
RUN /src/target/release/mpc-node --version | ||
|
||
# cc variant because we need libgcc and others | ||
FROM gcr.io/distroless/cc-debian12:nonroot | ||
|
||
# Copy the mpc-node binary | ||
COPY --from=build-env --chown=0:10001 --chmod=010 /src/target/release/mpc-node /bin/mpc-node | ||
|
||
ENTRYPOINT [ "/bin/mpc-node" ] |
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 +1 @@ | ||
# service-template-rs | ||
# MPC Service |
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,2 @@ | ||
[toolchain] | ||
channel = "nightly-2024-01-26" |
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,3 @@ | ||
group_imports = "StdExternalCrate" | ||
imports_granularity = "Module" | ||
max_width = 80 |