2023-07-16 20:10:04 +01:00
|
|
|
FROM docker.io/library/rust:1.62-alpine as builder
|
2023-07-16 10:49:16 +01:00
|
|
|
|
2023-07-16 20:10:04 +01:00
|
|
|
RUN apk add --no-cache musl-dev openssl-dev openssl-libs-static
|
2023-07-16 10:49:16 +01:00
|
|
|
RUN update-ca-certificates
|
|
|
|
|
2023-07-16 20:10:04 +01:00
|
|
|
WORKDIR /build
|
2023-07-16 10:49:16 +01:00
|
|
|
|
|
|
|
COPY ./ .
|
|
|
|
|
2023-07-16 20:10:04 +01:00
|
|
|
RUN cargo build --release --bins
|
2023-07-16 10:49:16 +01:00
|
|
|
|
|
|
|
FROM scratch
|
|
|
|
|
2023-07-16 20:10:04 +01:00
|
|
|
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
|
|
|
COPY --from=builder /build/target/release/dref /
|
2023-07-16 10:49:16 +01:00
|
|
|
|
2023-07-16 20:10:04 +01:00
|
|
|
CMD ["./dref"]
|