From 5340979d23da14a98dce7210a5f00821c62ff8f1 Mon Sep 17 00:00:00 2001 From: Max Audron Date: Sat, 15 May 2021 14:18:59 +0200 Subject: add container build --- Containerfile | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Containerfile (limited to 'Containerfile') 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"] -- cgit v1.2.3