
如果你使用 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 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
Pandoc is an amazing universal document converter. Unfortunately, it just has a command-line interface. In this project, we enable the usage of Pandoc via a RESTful HTTP API, provide a mapping of Pandoc type identifiers to common media types, and wrap everything in a docker container, so that it can be easily used/deployed.
The API only allows POST requests. The data to be converted must be
passed in the request body. The header field Content-Type specifies
the input type and the header field Accept specifies the output type.
Since Pandoc uses its own type identifiers for input and output format, we
created a mapping between the Pandoc identifiers and
the corresponding media types. For instance, the Pandoc identifier html
maps to the media type text/html.
The mapping is incomplete since there does not exist
a media type for every format supported by Pandoc. Therefore, you can
also use the Pandoc identifiers in Content-Type and Accept but this
is not compliant with the HTTP specification. To be compliant, we support
the usage of application/x. as a prefix in front of a Pandoc identifier.
This prefix is the official media type tree for unregistered types.
To simplify the usage of this project, we wrapped everything into a docker container that can easily be deployed on any machine.
Pandoc uses latex to create pdfs. Since the latex dependencies add roughly 2gb to the docker image, we decided to create two images:
dwolters/pandoc-http:lasted does not include latex and is therefore unable to create pdfs (uncompressed ~700mb, compressed ~280mb). The :lastest tag is added by default if no tag is specified.dwolters/pandoc-http:latex includes latex and be used to create pdfs (uncompressed ~2.7gb, compressed ~2gb). It takes a while to build or pull this image.You can build the image yourself:
shdocker build -t dwolters/pandoc-http .
Or install it via docker hub:
shdocker pull dwolters/pandoc-http
Afterwards, you can start the container:
shdocker run -d -p 8080:80 --name my-pandoc-http dwolters/pandoc-http
Within the container the HTTP API is reachable on port 80. In the command above the HTTP API is bound to port 8080 of the docker host.
You can stop and remove the container if it is not needed anymore:
shdocker stop my-pandoc-http docker rm my-pandoc-http
In order to use this project without using the docker container, you first
must install Pandoc and add it to your PATH).
Alternatively, you can set the PANDOC env variable to define the location of your pandoc executable.
Afterwards, clone the repository and switch to the proper directory:
shgit clone https://github.com/dwolters/pandoc-http cd pandoc-http
Install the dependencies:
npm install
And finally, you can start the HTTP API for Pandoc:
node server.js
The API can run on a different port by setting the PORT environment variable, e.g., on port 8080:
PORT=8080 node server.js
Assuming the API listens on port 8080, you can test it by using curl. The following command shows how to convert html into markdown using our HTTP API for Pandoc:
curl -s -H "Content-Type: text/html" -H "Accept: text/markdown" --data "<h1>My Headline</h1>" http://localhost:8080/ curl -s -H "Content-Type: text/html" -H "Accept: docx" --data "<h1>My Headline</h1>" http://localhost:8080/ > file.docx curl -s -H "Content-Type: docx" -H "Accept: text/markdown" --data-binary "@file.docx" http://localhost:8080/
Please note that in this example the pandoc identifier for docx files is used. The correct media type would be application/vnd.openxmlformats-officedocument.wordprocessingml.document.
The Dockerfile is partially based on the Dockerfile of https://github.com/vpetersson/docker-pandoc.
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。





来自真实用户的反馈,见证轩辕镜像的优质服务