From b69770af23bdbdc210084954acac180cf46758ba Mon Sep 17 00:00:00 2001 From: Frank Yang Date: Sat, 17 Sep 2022 22:22:27 +0800 Subject: [PATCH] feat: add Dockerfile Signed-off-by: Frank Yang --- Dockerfile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3398230 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +FROM rust:1.61 as builder + +WORKDIR /app +COPY . /app +RUN cargo build --release --all-features --bin bindle-server + +FROM gcr.io/distroless/cc + +VOLUME [ "/bindle-data" ] + +ENV BINDLE_IP_ADDRESS_PORT="0.0.0.0:8080" +ENV BINDLE_DIRECTORY="/bindle-data/bindles" + +COPY --from=builder /app/target/release/bindle-server / + +CMD ["./bindle-server", "--unauthenticated", "--keyring", "/bindle-data/keyring.toml"]