aboutsummaryrefslogtreecommitdiff
path: root/Containerfile
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Containerfile26
1 files changed, 26 insertions, 0 deletions
diff --git a/Containerfile b/Containerfile
new file mode 100644
index 0000000..30802e3
--- /dev/null
+++ b/Containerfile
@@ -0,0 +1,26 @@
+# ------------------------------------------------------------------------------
+# Cargo Build Stage
+# ------------------------------------------------------------------------------
+
+FROM docker.io/rust:1.52-alpine as cargo-build
+
+RUN rustup default nightly && rustup update
+
+WORKDIR /work
+
+COPY . .
+
+RUN apk add --no-cache musl-dev
+RUN cargo build --release
+
+# ------------------------------------------------------------------------------
+# Final Stage
+# ------------------------------------------------------------------------------
+
+FROM alpine:3.13
+
+COPY --from=cargo-build /work/target/release/catinator /usr/local/bin
+
+ENV CATINATOR_CONFIG="/config.toml"
+
+CMD ["/usr/local/bin/catinator"]