-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Dockerfile run relayer (#1034)
- Loading branch information
1 parent
26333d2
commit d5ef727
Showing
3 changed files
with
33 additions
and
4 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,29 @@ | ||
# Build | ||
FROM rust:1.75 as builder | ||
|
||
WORKDIR /app | ||
COPY src /app/src | ||
COPY static /app/static | ||
COPY .sqlx /app/.sqlx | ||
COPY build.rs /app/build.rs | ||
COPY Cargo.toml /app/Cargo.toml | ||
COPY Cargo.lock /app/Cargo.lock | ||
COPY .cargo .cargo | ||
COPY config /app/config | ||
COPY proto /app/proto | ||
|
||
RUN apt update | ||
RUN apt-get install -y libclang-dev cmake protobuf-compiler | ||
|
||
ENV CARGO_PROFILE_RELEASE_DEBUG=1 | ||
ENV LOG_FORMAT=json | ||
ENV NO_COLOR=1 | ||
RUN cargo build --release --bin relayer --no-default-features --features metrics | ||
|
||
# Runtime | ||
FROM rust:1.75 as runtime | ||
WORKDIR /app | ||
COPY --from=builder /app/target/release/relayer /app/relayer | ||
COPY --from=builder /app/config/* /app/config/ | ||
|
||
CMD ["sh", "-c", "/app/relayer"] |
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