Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .Dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
target
Dockerfile
.dockerignore
.git
.gitignore
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM rust:1.59-slim AS builder

WORKDIR /build
RUN apt-get update
RUN apt-get install -y git clang cmake libsnappy-dev
COPY . .
RUN cargo build --release --package rendezvous-server --bin rendezvous-server


FROM debian:bullseye-slim
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using distroless will likely make for a smaller image: https://github.com/GoogleContainerTools/distroless/blob/main/examples/rust/Dockerfile

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Will try that

WORKDIR /data
COPY --from=builder /build/target/release/rendezvous-server /bin/rendezvous-server
EXPOSE 8888
ENTRYPOINT ["rendezvous-server"]