17 lines
453 B
Docker
17 lines
453 B
Docker
FROM rust:1.92 AS builder
|
|
|
|
RUN rustup target add x86_64-unknown-linux-musl
|
|
RUN apt-get update && apt-get install -y musl-tools && rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
COPY ./Cargo.toml ./Cargo.lock ./
|
|
COPY ./src ./src
|
|
|
|
RUN cargo build --release --target x86_64-unknown-linux-musl
|
|
|
|
FROM scratch
|
|
|
|
COPY --from=builder /usr/src/app/target/x86_64-unknown-linux-musl/release/pg-instance-handler /pg-instance-handler
|
|
|
|
CMD ["/pg-instance-handler"] |