2023-06-19 19:58:27 +00:00
|
|
|
FROM rust:1.70.0-slim-bookworm as builder
|
2023-01-17 21:35:35 +00:00
|
|
|
WORKDIR /src
|
2023-02-12 19:13:42 +00:00
|
|
|
RUN apt-get update &&\
|
|
|
|
apt-get install -y libssl-dev gcc musl pkg-config
|
2023-01-17 21:35:35 +00:00
|
|
|
COPY ./ .
|
2023-03-24 14:56:44 +00:00
|
|
|
RUN rustup default nightly && rustup update
|
|
|
|
RUN cargo build --release --jobs 2 -Z sparse-registry
|
2023-01-17 21:35:35 +00:00
|
|
|
|
|
|
|
|
2023-02-12 19:13:42 +00:00
|
|
|
FROM debian:stable
|
2023-02-12 08:51:14 +00:00
|
|
|
COPY --from=builder /src/target/release/dudo /bin/dudo
|
2023-02-12 19:13:42 +00:00
|
|
|
RUN apt-get update &&\
|
|
|
|
apt-get install openssl ca-certificates &&\
|
|
|
|
apt-get clean
|
2023-02-12 08:51:14 +00:00
|
|
|
RUN chmod +x /bin/dudo
|
2023-01-17 21:35:35 +00:00
|
|
|
WORKDIR /workdir
|
2023-02-12 08:51:14 +00:00
|
|
|
ENTRYPOINT ["/bin/dudo"]
|