Skip to content

Commit

Permalink
chore: add Dockerfile (#3)
Browse files Browse the repository at this point in the history
* feat: add Dockerfile

* chore: expose port in Dockerfile

* chore: divide build and run stage

* chore: Dockerfile nits

---------

Co-authored-by: Bufo <bufo24@users.noreply.github.com>
  • Loading branch information
bufo24 and bufo24 authored Jul 8, 2024
1 parent d917ffc commit 6efe35b
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM rust:1.79 AS builder

WORKDIR /app

COPY ./ ./

RUN cargo build --release

FROM debian:bookworm-slim

RUN apt-get update && \
apt-get upgrade && \
apt-get install -y libsqlite3-0 libpq5 ca-certificates && \
apt-get clean all && \
rm -rf /var/lib/apt/lists/*

COPY --from=builder /app/target/release/covclaim /usr/local/bin/covclaim
COPY --from=builder /app/.env /.env

EXPOSE 1234

CMD ["/usr/local/bin/covclaim"]

0 comments on commit 6efe35b

Please sign in to comment.