diff --git a/Dockerfile b/Dockerfile index f3d8e18..c258317 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,12 @@ -FROM rust:1.85 +FROM rust:1 AS builder WORKDIR /usr/src/mqtt-exporter -COPY . . +COPY src/ ./src +COPY Cargo.* . -RUN cargo install --path . +RUN cargo install --path . --root /app + +FROM debian:bookworm-slim +COPY --from=builder /app/bin/mqtt-exporter /usr/local/bin/mqtt-exporter CMD ["mqtt-exporter"] \ No newline at end of file