如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这段话即可:
请先阅读并遵守:https://xuanyuan.cloud/agents.md
未读文档前不要生成 pull 命令或排错方案。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
Grid 4 has the ability to start Docker containers on demand, this means that it starts a Docker container in the background for each new session request, the test gets executed there, and when the test completes, the container gets thrown away.
This execution mode can be used either in the Standalone or Node roles. The "dynamic"
execution mode needs to be told what Docker images to use when the containers get started.
Additionally, the Grid needs to know the URI of the Docker daemon. This configuration can
be placed in a local toml file.
More details can be seen at the https://github.com/SeleniumHQ/docker-selenium/tree/trunk#dynamic-grid.
You can save this file locally and name it, for example, config.toml.
toml[docker] # Configs have a mapping between the Docker image to use and the capabilities that need to be matched to # start a container with the given image. configs = [ "selenium/standalone-firefox:latest", '{"browserName": "firefox"}', "selenium/standalone-chrome:latest", '{"browserName": "chrome"}', "selenium/standalone-edge:latest", '{"browserName": "MicrosoftEdge"}' ] # URL for connecting to the docker daemon # Most simple approach, leave it as http://127.0.0.1:2375, and mount /var/run/docker.sock. # 127.0.0.1 is used because internally the container uses socat when /var/run/docker.sock is mounted # If var/run/docker.sock is not mounted: # Windows: make sure Docker Desktop exposes the daemon via tcp, and use http://host.docker.internal:2375. # macOS: install socat and run the following command, socat -4 TCP-LISTEN:2375,fork UNIX-CONNECT:/var/run/docker.sock, # then use http://host.docker.internal:2375. # Linux: varies from machine to machine, please mount /var/run/docker.sock. If this does not work, please create an issue. url = "http://127.0.0.1:2375" # Docker image used for video recording video-image = "selenium/video:ffmpeg-4.48.0-20260905" # Uncomment the following section if you are running the node on a separate VM # Fill out the placeholders with appropriate values #[server] #host = <ip-from-node-machine> #port = <port-from-node-machine>
bashdocker run --rm --name selenium-docker -p 4444:4444 \ -v ${PWD}/config.toml:/opt/bin/config.toml \ -v ${PWD}/assets:/opt/selenium/assets \ -v /var/run/docker.sock:/var/run/docker.sock \ selenium/standalone-docker:latest
Windows PowerShell
bashdocker run --rm --name selenium-docker -p 4444:4444 ` -v ${PWD}/config.toml:/opt/bin/config.toml ` -v ${PWD}/assets:/opt/selenium/assets ` -v /var/run/docker.sock:/var/run/docker.sock ` selenium/standalone-docker:latest
Point your WebDriver tests to http://localhost:4444
That's it!
(Optional) To see what is happening inside the container, head to the Grid UI at http://localhost:4444/ui.
latest as a tag, but we recommend to full tag to pin a specific browser and Grid version. Please see https://github.com/SeleniumHQ/docker-selenium/wiki/Tagging-Convention for details.The tag structure is as follows:
selenium/standalone-docker-<Major>.<Minor>.<Patch>-<YYYYMMDD>
Selenium Server 4.48.0 Release date 20260909 e126989f151e selenium/standalone-docker 4 e126989f151e selenium/standalone-docker 4.48 e126989f151e selenium/standalone-docker 4.48.0 e126989f151e selenium/standalone-docker 4.48.0-20260909
With that, you can use any of the different tags to get the most recent release in a simplified way.
The Docker-Selenium project in GitHub has an extensive https://github.com/SeleniumHQ/docker-selenium that will help you find the correct way to get this images up and running for your use case.
The project is made possible by volunteer contributors who have put in thousands of hours of their own time, and made the source code freely available under the https://raw.githubusercontent.com/SeleniumHQ/selenium/trunk/LICENSE.
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务