docker镜像使用对应提交代码,便于多版本管理

pull/9/head
NepPure 2025-02-28 21:34:43 +08:00
parent f5edefebb4
commit 252f0f03f5
1 changed files with 3 additions and 4 deletions

View File

@ -1,11 +1,10 @@
FROM nonebot/nb-cli:latest FROM nonebot/nb-cli:latest
WORKDIR / WORKDIR /
RUN apt update && apt install -y git COPY . /MaiMBot/
RUN git clone https://github.com/SengokuCola/MaiMBot
WORKDIR /MaiMBot WORKDIR /MaiMBot
RUN mkdir config RUN mkdir config
RUN mv /MaiMBot/env.example /MaiMBot/config/.env \ RUN mv env.example config/.env \
&& mv /MaiMBot/src/plugins/chat/bot_config_toml /MaiMBot/config/bot_config.toml && mv src/plugins/chat/bot_config_toml config/bot_config.toml
RUN ln -s /MaiMBot/config/.env /MaiMBot/.env \ RUN ln -s /MaiMBot/config/.env /MaiMBot/.env \
&& ln -s /MaiMBot/config/bot_config.toml /MaiMBot/src/plugins/chat/bot_config.toml && ln -s /MaiMBot/config/bot_config.toml /MaiMBot/src/plugins/chat/bot_config.toml
RUN pip install -r requirements.txt RUN pip install -r requirements.txt