From 91926dd2cd0a2008adbeb1b9fec12d84b8496204 Mon Sep 17 00:00:00 2001 From: Seth For Privacy <40500387+sethforprivacy@users.noreply.github.com> Date: Tue, 23 Apr 2024 10:06:15 -0400 Subject: Add Dockerfile and GAs for Docker image deployment * Initial Dockerfile and Github Actions * Properly name final Docker build stage * Add tag for package.version * Correct cargo-get syntax * Fix version tagging and add sentrum.toml to .gitignore * Fix newlines and add Docker examples * Fix branch on Github Action and minor copy update --- Dockerfile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Dockerfile (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e47c749 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +FROM rust:bookworm as builder + +WORKDIR /usr/src/sentrum +COPY . . + +RUN cargo build --release + +FROM debian:bookworm-slim as final + +# Upgrade all packages and install dependencies +RUN apt-get update \ + && apt-get upgrade -y +RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends libssl-dev \ + && apt clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* + +COPY --from=builder /usr/src/sentrum/target/release/sentrum /usr/local/bin/sentrum + +COPY sentrum.sample.toml sentrum.toml + +CMD ["sentrum"] -- cgit v1.2.3-70-g09d2