29 lines
1.1 KiB
Text
29 lines
1.1 KiB
Text
FROM r.batts.cloud/nodejs:22 AS frontend-builder
|
|
|
|
COPY ./maubot/management/frontend /frontend
|
|
RUN cd /frontend && yarn --prod && yarn build
|
|
|
|
FROM r.batts.cloud/debian:bookworm
|
|
|
|
RUN apt update && \
|
|
apt install -y --no-install-recommends python3 python3-dev python3-venv python3-semver git gosu yq brotli && \
|
|
apt clean -y && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY requirements.txt /opt/maubot/requirements.txt
|
|
COPY optional-requirements.txt /opt/maubot/optional-requirements.txt
|
|
WORKDIR /opt/maubot
|
|
RUN python3 -m venv /venv \
|
|
&& bash -c 'source /venv/bin/activate \
|
|
&& pip3 install -r requirements.txt -r optional-requirements.txt \
|
|
dateparser langdetect python-gitlab pyquery tzlocal pyfiglet emoji feedparser brotli'
|
|
# TODO also remove pyfiglet, emoji, dateparser, langdetect and pyquery when maubot supports installing dependencies
|
|
|
|
COPY . /opt/maubot
|
|
RUN cp maubot/example-config.yaml .
|
|
COPY ./docker/mbc.sh /usr/local/bin/mbc
|
|
COPY --from=frontend-builder /frontend/build /opt/maubot/frontend
|
|
ENV UID=1337 GID=1337 XDG_CONFIG_HOME=/data
|
|
VOLUME /data
|
|
|
|
CMD ["/opt/maubot/docker/run.sh"]
|