18 lines
389 B
Docker
18 lines
389 B
Docker
FROM rust:1.84 AS builder
|
|
WORKDIR /app
|
|
|
|
RUN apt update && apt install -y musl-tools
|
|
RUN rustup target add x86_64-unknown-linux-musl
|
|
|
|
COPY . .
|
|
RUN cargo build --release --target=x86_64-unknown-linux-musl
|
|
|
|
FROM alpine:latest
|
|
WORKDIR /app
|
|
|
|
COPY --from=builder /app/target/x86_64-unknown-linux-musl/release/exporter /app/exporter
|
|
RUN apk add --no-cache ca-certificates
|
|
|
|
|
|
CMD ["/app/exporter"]
|