Skip to content

Commit

Permalink
Add dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
bouzuya committed Mar 6, 2023
1 parent b43a956 commit 74c4e71
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Dockerfile
@@ -0,0 +1,14 @@
FROM rust:1.67-alpine AS builder
WORKDIR /home/rust
RUN apk update && apk add --no-cache musl-dev
COPY ./Cargo.lock ./Cargo.lock
COPY ./Cargo.toml ./Cargo.toml
RUN mkdir src/
RUN touch src/lib.rs
RUN cargo build --release --target=x86_64-unknown-linux-musl
COPY . .
RUN cargo install --path . --target=x86_64-unknown-linux-musl

FROM scratch
COPY --from=builder /usr/local/cargo/bin/nostr-user-discovery /usr/local/bin/nostr-user-discovery
ENTRYPOINT ["nostr-user-discovery"]

0 comments on commit 74c4e71

Please sign in to comment.