summaryrefslogtreecommitdiffstatshomepage
path: root/Dockerfile
diff options
context:
space:
mode:
authorLibravatar Seth For Privacy <40500387+sethforprivacy@users.noreply.github.com>2024-04-23 10:06:15 -0400
committerLibravatar GitHub <noreply@github.com>2024-04-23 14:06:15 +0000
commit91926dd2cd0a2008adbeb1b9fec12d84b8496204 (patch)
tree440d274b37fdd92aacf59ca5c7cd25591bb04731 /Dockerfile
parent3c494018142b5a1c236681eb9a2abc9010ea1014 (diff)
downloadsentrum-91926dd2cd0a2008adbeb1b9fec12d84b8496204.tar.gz
sentrum-91926dd2cd0a2008adbeb1b9fec12d84b8496204.tar.bz2
sentrum-91926dd2cd0a2008adbeb1b9fec12d84b8496204.zip
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
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile20
1 files changed, 20 insertions, 0 deletions
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"]