-
Notifications
You must be signed in to change notification settings - Fork 0
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
0 parents
commit a7c855f
Showing
1 changed file
with
19 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Build application | ||
# | ||
# Copy in all crates, Cargo.toml and Cargo.lock unmodified, | ||
# and build the application. | ||
FROM rust:1.81-bullseye AS builder | ||
RUN apt-get update && apt-get install -y cmake clang | ||
|
||
ARG VERSION=main | ||
RUN git clone --depth=1 --branch ${VERSION} https://github.com/MystenLabs/sui | ||
WORKDIR "$WORKDIR/sui" | ||
|
||
ARG PROFILE=release | ||
RUN cargo build --profile ${PROFILE} --bin sui | ||
|
||
# Production Image | ||
FROM debian:bullseye-slim AS runtime | ||
RUN apt-get update && apt-get install -y ca-certificates curl | ||
WORKDIR "$WORKDIR/sui" | ||
COPY --from=builder /sui/target/release/sui /usr/local/bin |