diff options
| author | Max Audron <audron@cocaine.farm> | 2021-05-15 14:18:59 +0200 |
|---|---|---|
| committer | Max Audron <audron@cocaine.farm> | 2021-05-15 14:18:59 +0200 |
| commit | 5340979d23da14a98dce7210a5f00821c62ff8f1 (patch) | |
| tree | 9da032925d3feadfe521a566637910a70549152d /Containerfile | |
| parent | add config file (diff) | |
add container build
Diffstat (limited to '')
| -rw-r--r-- | Containerfile | 26 |
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"] |
