Files
system-exporter/Dockerfile

25 lines
528 B
Docker

# ---- Build Stage ----
FROM rust:1.71.1-slim-bullseye as build
ARG DEBIAN_FRONTEND=noninteractive
RUN apt update && apt install -y \
iputils-ping \
libpq-dev \
cmake \
pkg-config \
gcc \
g++ \
python3 \
libssl-dev \
protobuf-compiler \
git
ARG DEBIAN_FRONTEND=noninteractive
WORKDIR /app
COPY . .
RUN cargo build --release
## ---- Production Stage ----
FROM debian:bookworm AS production
WORKDIR /app
COPY --from=build /app/target/release/system-exporter ./
CMD [ "./system-exporter" ]