Files
wt 25fa51c76d
Test, build and publish / All tests and Linux binary (push) Failing after 28s
Test, build and publish / Container smoke test and Gitea publish (push) Skipped
added ci
2026-10-20 17:41:56 +07:00

27 lines
1010 B
Docker

FROM rust:1.99.1-slim AS builder
WORKDIR /src
COPY Cargo.toml Cargo.lock ./
COPY src ./src
RUN cargo build --release --locked
FROM debian:trixie-slim AS runtime-base
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates gosu \
&& rm -rf /var/lib/apt/lists/*
COPY scripts/docker-entrypoint.sh /usr/local/bin/rust-xmpp-entrypoint
RUN chmod 0755 /usr/local/bin/rust-xmpp-entrypoint
WORKDIR /work
ENTRYPOINT ["rust-xmpp-entrypoint"]
CMD ["serve", "/etc/prosody/prosody.cfg.lua", "--experimental"]
# CI downloads the exact executable produced by the verification job.
FROM runtime-base AS ci-runtime
COPY dist/rust-xmpp /usr/local/bin/rust-xmpp
RUN chmod 0755 /usr/local/bin/rust-xmpp \
&& ln -s /usr/local/bin/rust-xmpp /usr/local/bin/prosodyctl
# Default local build still compiles directly from source.
FROM runtime-base AS runtime
COPY --from=builder /src/target/release/rust-xmpp /usr/local/bin/rust-xmpp
RUN ln -s /usr/local/bin/rust-xmpp /usr/local/bin/prosodyctl