16 lines
475 B
Docker
16 lines
475 B
Docker
FROM rust:alpine AS builder
|
|
RUN apk add --no-cache musl-dev musl-utils musl gcc
|
|
WORKDIR /usr/src/app
|
|
|
|
COPY Cargo.toml Cargo.lock ./
|
|
|
|
COPY src ./src
|
|
ENV RUSTFLAGS="-C target-feature=+crt-static"
|
|
|
|
RUN rustup target add x86_64-unknown-linux-musl && cargo build --release --target x86_64-unknown-linux-musl
|
|
|
|
FROM alpine:latest
|
|
RUN apk add --no-cache libgcc
|
|
|
|
COPY --from=builder /usr/src/app/target/x86_64-unknown-linux-musl/release/nostr-relay /usr/local/bin/
|
|
CMD ["nostr-relay"] |