-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
27 lines (20 loc) · 756 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
FROM docker.io/library/rust:1-slim-bookworm AS builder
WORKDIR /usr/src/myapp
COPY . .
RUN cargo install --path .
FROM docker.io/library/debian:bookworm-slim
LABEL org.opencontainers.image.authors="Johann Queuniet"
LABEL org.opencontainers.image.source="https://github.com/jqueuniet/ecowitt_exporter"
LABEL org.opencontainers.image.description="Republish metrics sent with the Ecowitt weather station protocol to the prometheus format "
LABEL org.opencontainers.image.licenses="AGPL"
ENV ROCKET_ADDRESS=0.0.0.0
COPY --from=builder /usr/local/cargo/bin/ecowitt_exporter /usr/local/bin/
RUN adduser \
--quiet \
--system \
--no-create-home \
--group \
--disabled-password \
exporter
USER exporter
ENTRYPOINT ["ecowitt_exporter"]