Skip to content

Commit

Permalink
feat: add Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
spagett1maker committed Aug 30, 2022
1 parent fb8a645 commit 0a73917
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions colony-chain/Dockerfile
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"]

0 comments on commit 0a73917

Please sign in to comment.