From d6fa0cf59adeac05f56c32b64c63479039eb01d8 Mon Sep 17 00:00:00 2001 From: Xander Bil Date: Tue, 12 Nov 2024 17:57:23 +0100 Subject: [PATCH] Add containerfile --- Containerfile | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Containerfile diff --git a/Containerfile b/Containerfile new file mode 100644 index 0000000..527499a --- /dev/null +++ b/Containerfile @@ -0,0 +1,23 @@ +# Build backend +FROM rust:1.82-alpine3.20 as build_backend + +RUN apk add musl-dev openssl-dev pkgconf openssl-libs-static + +WORKDIR / + +COPY Cargo.* ./ + +COPY migration migration/ + +COPY src src/ + +RUN cargo build --release + +# End container +FROM alpine:3.20 + +WORKDIR / + +COPY --from=build_backend target/release/mailauth . + +ENTRYPOINT ["./mailauth"]