
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
This is a simple image for hosting your own 5eTools instance. It is based on the Apache httpd image and uses components of the auto-updater script from the 5eTools wiki. This image is built from https://github.com/Jafner/5etools-docker.
Below we talk about how to install and configure the container.
You can quick-start this image by running:
mkdir -p ~/5etools-docker/htdocs && cd ~/5etools-docker curl -o docker-compose.yml https://raw.githubusercontent.com/Jafner/5etools-docker/main/docker-compose.yml docker-compose up -d && docker logs -f 5etools-docker
Then give the container a few minutes to come online (it takes a while to pull the Github repository) and it will be accessible at localhost:8080.
When you stop the container, it will automatically delete itself. The downloaded files will remain in the ~/5etools-docker/htdocs directory, so you can always start the container back up by running docker-compose up -d.
By default, I assume you want to keep downloaded files, even if the container dies. And you want the downloaded files to be located at ~/5etools-docker/htdocs.
If you want the files to be located somewhere else on your system, change the left side of the volume mapping. For example, if I wanted to keep my files at ~/data/docker/5etools, the volume mapping would be:
volumes: - ~/data/docker/5etools:/usr/local/apache2/htdocs
Alternatively, you can have Docker or Compose manage your volume. (This makes adding homebrew practically impossible.)
Use a Compose-managed volume with:
... volumes: - 5etools-docker:/usr/local/apache2/htdocs ... volumes: 5etools-docker:
Or have the Docker engine manage the volume (as opposed to Compose). First, create the volume with docker volume create 5etools-docker, then add the following to your docker-compose.yml:
... volumes: - 5etools-docker:/usr/local/apache2/htdocs ... volumes: 5etools-docker: external: true
The image uses environment variables to figure out how you want it to run.
By default, I assume you want to automatically download the latest files from the Github mirror. Use the environment variables in the docker-compose.yml file to configure things.
Required unless OFFLINE_MODE=TRUE. Expects one of "TRUE", "FALSE" Where:
"TRUE" pulls from https://github.com/5etools-mirror-2/5etools-mirror-2.github.io.git and adds https://github.com/5etools-mirror-2/5etools-img as a submodule for image files. "FALSE" pulls from https://github.com/5etools-mirror-2/5etools-mirror-2.github.io.git without image files.
The get.5e.tools source has been down (redirecting to 5e.tools) during development. This method is not tested.
Optional. Expects "TRUE" to enable. Setting this to true tells the server to run from the local files if available, or exits if there is no local version.
During the image build process, we set the owner of the htdocs directory to 1000:1000 by default. If you need a different UID and GID to own the files, you can build the image from the source Dockerfile and pass the PUID and PGID variables as desired.
Supporting integration of a reverse proxy is beyond the scope of this guide.
However, any instructions which work for the base httpd (Apache) image, should also work for this, as it is minimally different.
To use auto-loading homebrew, you will need to use a host directory mapping as described above.
docker logs -f 5etools-docker.~/5etools-docker/htdocs:/usr/local/apache2/htdocs place your homebrew json files into the ~/5etools-docker/htdocs/homebrew/ folder, then add their filenames to the ~/5etools-docker/htdocs/homebrew/index.json file.
For example, if your homebrew folder contains:index.json 'Jafner; JafnerBrew Campaigns.json' 'Jafner; JafnerBrew Collection.json' 'Jafner; Legendary Tomes of Knowledge.json' 'KibblesTasty; Artificer (Revised).json'
Then your index.json should look like:
json{ "readme": [ "NOTE: This feature is designed for use in user-hosted copies of the site, and not for integrating \"official\" 5etools content.", "The \"production\" version of the site (i.e., not the development ZIP) has this feature disabled. You can re-enable it by replacing `IS_DEPLOYED = \"X.Y.Z\";` in the file `js/utils.js`, with `IS_DEPLOYED = undefined;`", "This file contains as an index for other homebrew files, which should be placed in the same directory.", "For example, add \"My Homebrew.json\" to the \"toImport\" array below, and have a valid JSON homebrew file in this (\"homebrew/\") directory." ], "toImport": [ "Jafner; JafnerBrew Collection.json", "Jafner; JafnerBrew Campaigns.json", "Jafner; Legendary Tomes of Knowledge.json", "KibblesTasty; Artificer (Revised).json" ] }
Note the commas after each entry except the last in each array. See the wiki page for more information.
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务