This repository has been archived by the owner on Aug 7, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add cross-platform (Windows, Linux and Mac)
- Loading branch information
Showing
2 changed files
with
19 additions
and
6 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,9 +1,21 @@ | ||
FROM rust:1.79.0 as builder | ||
|
||
WORKDIR /app | ||
RUN apt-get update && apt-get install -y \ git \ | ||
RUN git clone https://github.com/Bitswap-BiFi-Bitswap-demo.git /path/to/clone | ||
|
||
RUN apt-get update && apt-get install -y git mingw-w64 | ||
|
||
RUN rustup target add x86_64-pc-windows-gnu | ||
|
||
RUN git clone https://github.com/Bitswap-BiFi-Bitswap-demo.git /app/Bitswap-BiFi-Bitswap-demo | ||
|
||
WORKDIR /app/Bitswap-BiFi-Bitswap-demo | ||
RUN cd Bitswap-BiFi-Bitswap-demo && cargo build | ||
RUN --releasCOPY --from=builder /Bitswap-BiFi-Bitswap-demo/target/release/main. | ||
RUN --releaseCMD ["./main"] | ||
CMD ["main.rs", "command.rs"] | ||
|
||
RUN cargo build --release --target x86_64-pc-windows-gnu | ||
|
||
FROM debian:buster-slim | ||
|
||
WORKDIR /app | ||
|
||
COPY --from=builder /app/Bitswap-BiFi-Bitswap-demo/target/x86_64-pc-windows-gnu/release/main.exe . | ||
|
||
CMD ["./main.exe", "main.rs", "command.rs"] |
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