mirsal
cd590b73fe
This is a rewrite of our old feedbot in rust, heavily inspired from rek2's INN matrix bot and making use of some bits from matrix-rust-sdk This is an asynchronous tokio-based matrix client using a stateless feed fetcher implementation based on reqwest, it uses feed_rs for parsing RSS and Atom feeds. State persistence is achieved using a simple file-backed datastore with serde_yaml as a serialization format. Published under the GNU General Public License version 3 or later.
26 lines
597 B
Docker
26 lines
597 B
Docker
FROM rust:1.82.0-slim-bookworm AS build
|
|
|
|
RUN USER=root cargo new --bin matrix-feedbot
|
|
WORKDIR /matrix-feedbot
|
|
|
|
COPY Cargo.lock ./
|
|
COPY Cargo.toml ./
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends libssl-dev pkg-config
|
|
|
|
# cache dependencies
|
|
RUN cargo build --release
|
|
RUN rm src/*.rs
|
|
|
|
COPY src ./src
|
|
|
|
RUN rm target/release/deps/matrix_feedbot*
|
|
RUN cargo build --release
|
|
|
|
FROM debian:bookworm-slim
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends libssl3 && apt-get clean
|
|
COPY --from=build /matrix-feedbot/target/release/matrix-feedbot .
|
|
|
|
CMD ["./matrix-feedbot"]
|