vb: changes for running locally with my own docker image
This commit is contained in:
parent
10383d526f
commit
51e1f699ad
2 changed files with 35 additions and 1 deletions
30
Dockerfile.local
Normal file
30
Dockerfile.local
Normal file
|
@ -0,0 +1,30 @@
|
|||
FROM r.batts.cloud/nodejs:18 AS frontend-builder
|
||||
|
||||
COPY ./maubot/management/frontend /frontend
|
||||
RUN cd /frontend && yarn --prod && yarn build
|
||||
|
||||
#FROM alpine:3.18
|
||||
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"]
|
Loading…
Add table
Add a link
Reference in a new issue