-
Notifications
You must be signed in to change notification settings - Fork 6
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
1 parent
fb8a645
commit 0a73917
Showing
1 changed file
with
21 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,21 @@ | ||
# Step 1: Build backend | ||
FROM rust:1.61-alpine AS builder-backend | ||
|
||
RUN rustup target add x86_64-unknown-linux-musl | ||
RUN apk add --no-cache musl-dev openssl-dev | ||
|
||
WORKDIR /src | ||
|
||
COPY /. . | ||
|
||
RUN USER=root cargo build -p pdao-polkadot-colony-chain --target x86_64-unknown-linux-musl --release | ||
|
||
# Step 2: Compose final image | ||
FROM alpine | ||
|
||
WORKDIR /src | ||
|
||
COPY --from=builder-backend /src/target/x86_64-unknown-linux-musl/release/pdao-polkadot-colony-chain ./ | ||
|
||
ENV RUST_LOG=debug | ||
CMD ["./pdao-polkadot-colony-chain", "4200"] |