dockerfile fixed
parent
c5623468f1
commit
0fa6a2e4b2
20
Dockerfile
20
Dockerfile
|
|
@ -1,17 +1,17 @@
|
||||||
FROM rust:1.75 AS builder
|
FROM rust:1.84 AS builder
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
RUN apt update && apt install -y musl-tools
|
||||||
|
RUN rustup target add x86_64-unknown-linux-musl
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
RUN cargo build --release --target=x86_64-unknown-linux-musl
|
||||||
|
|
||||||
RUN cargo build --release
|
FROM alpine:latest
|
||||||
|
|
||||||
FROM debian:bullseye-slim
|
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
# RUN sudo apt update
|
|
||||||
# RUN sudo apt install libc6
|
COPY --from=builder /app/target/x86_64-unknown-linux-musl/release/exporter /app/exporter
|
||||||
COPY --from=builder /app/target/release/exporter /app/server
|
RUN apk add --no-cache ca-certificates
|
||||||
EXPOSE 9100
|
EXPOSE 9100
|
||||||
|
|
||||||
CMD ["/app/server"]
|
CMD ["/app/exporter"]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue