FROM rust:1.78-alpine3.20 AS builder WORKDIR /usr/src/formulate ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse COPY . . RUN apk add libc-dev pkgconfig libressl-dev RUN cargo build --release FROM alpine:3.20 LABEL dev.orbitsolutions.code="ORB IT Solutions LLC" LABEL org.opencontainers.image.authors="orbit+maint@orbitsolutions.dev" LABEL version="1.1" ENV OPENSMTPD_VER="7.5.0p0" RUN apk add --no-cache -t opensmtpd-rundeps \ "opensmtpd~${OPENSMTPD_VER}"; \ mkdir -p /var/spool/smtpd && chmod 711 /var/spool/smtpd COPY --from=builder /usr/src/formulate/target/release/formulate /usr/local/bin/formulate ENV FORMULATE_destination_email="" ENV FORMULATE_sending_email="" EXPOSE 25 8000 CMD ["/bin/sh", "-c", "smtpd -v; formulate"]