mirror of
https://github.com/AstrBotDevs/AstrBot.git
synced 2026-10-16 15:06:04 +08:00
* feat: ship astrbot CLI in Docker image for in-container password reset
Install the project itself into the image so the `astrbot` console
script (including `astrbot password` and `astrbot conf set`) is
available inside the container, and mark /AstrBot as an initialized
AstrBot root via the .astrbot marker file.
This lets Docker users reset a forgotten dashboard password with:
docker exec -it astrbot astrbot password
Document the workflow in the zh/en Docker deployment guides, including
the required container restart for the new password to take effect.
* docs: reorganize FAQ password reset section by deployment method
Split the forgot-password FAQ entry into Docker, uv/pip package, and
other deployment subsections. The Docker entry uses the in-container
CLI shipped with the image; the uv/pip entry covers `astrbot password`
and `astrbot run --reset-password`; the manual cmd_config.json edit
remains as the universal fallback.
* docs: mention --username option in uv/pip FAQ password reset entry
* docs: drop --reset-password mention from FAQ to keep reset steps unambiguous
* docs: clarify that the first astrbot in docker exec is the container name
* feat: use editable install for astrbot CLI in Docker image
Install the project with 'uv pip install -e .' so the astrbot console
script always reflects the source tree baked into the image, avoiding
drift between the CLI and the running server code.
38 lines
973 B
Docker
38 lines
973 B
Docker
FROM python:3.12-slim
|
|
WORKDIR /AstrBot
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
gcc \
|
|
build-essential \
|
|
python3-dev \
|
|
libffi-dev \
|
|
libssl-dev \
|
|
ca-certificates \
|
|
bash \
|
|
ffmpeg \
|
|
libavcodec-extra \
|
|
fonts-noto-cjk \
|
|
curl \
|
|
gnupg \
|
|
git \
|
|
ripgrep \
|
|
&& curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - \
|
|
&& apt-get install -y --no-install-recommends nodejs \
|
|
&& apt-get clean \
|
|
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|
|
|
COPY . /AstrBot/
|
|
|
|
RUN python -m pip install uv \
|
|
&& echo "3.12" > .python-version \
|
|
&& uv lock \
|
|
&& uv export --format requirements.txt --output-file requirements.txt --frozen \
|
|
&& uv pip install -r requirements.txt --no-cache-dir --system \
|
|
&& uv pip install socksio uv pilk --no-cache-dir --system \
|
|
&& uv pip install -e . --no-deps --system \
|
|
&& touch /AstrBot/.astrbot
|
|
|
|
EXPOSE 6185
|
|
|
|
CMD ["python", "main.py"]
|