AnyBot/deploy/server/Dockerfile

17 lines
800 B
Docker

# AnyBot without a window (`anybot --serve`) on a Linux server: the bots, routines, triggers and
# channels run around the clock; the person uses the phone. The bot's own computer is a sibling
# container started through the host's Docker (the socket is mounted in docker-compose.yml).
# Build from the app/ folder: docker build -f deploy/server/Dockerfile -t anybot-serve .
FROM rust:1-bookworm AS build
WORKDIR /src
COPY . .
RUN cargo build --release --bin anybot
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates curl git ripgrep poppler-utils docker.io openssh-client \
&& rm -rf /var/lib/apt/lists/*
COPY --from=build /src/target/release/anybot /usr/local/bin/anybot
ENV ANYBOT_DATA_DIR=/data
VOLUME /data
CMD ["anybot", "--serve"]