bashdocker run -d -p 4444:4444 -p 7900:7900 --shm-size="2g" selenium/standalone-chrome:latest
Point your WebDriver tests to http://localhost:4444
That's it!
(Optional) To see what is happening inside the container, head to http://localhost:7900/?autoconnect=1&resize=scale&password=secret.
When executing docker run for an image that contains a browser please use the flag --shm-size=2g to use the host's shared memory.
The example above uses 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-chrome-<Major>.<Minor>.<Patch>-<YYYYMMDD>
Also with browser version and browser driver version
selenium/standalone-chrome-<browserVersion>-<browserDriver>-<browserDriverVersion>-<Major>.<Minor>.<Patch>-<YYYYMMDD>
Plus all the permutations from the above one
Chrome 112.0 ChromeDriver 112.0 Selenium Server 4.9.0 Release date 20230426 e126989f151e selenium/standalone-chrome 4 e126989f151e selenium/standalone-chrome 4.9 e126989f151e selenium/standalone-chrome 4.9.0 e126989f151e selenium/standalone-chrome 4.9.0-20230426 e126989f151e selenium/standalone-chrome 112.0 e126989f151e selenium/standalone-chrome 112.0-20230426 e126989f151e selenium/standalone-chrome 112.0-chromedriver-112.0 e126989f151e selenium/standalone-chrome 112.0-chromedriver-112.0-20230426 e126989f151e selenium/standalone-chrome 112.0-chromedriver-112.0-grid-4.9.0-20230426
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.
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
无需登录使用专属域名
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
Harbor Proxy Repository 对接专属域名
Portainer Registries 加速拉取
Nexus3 Docker Proxy 内网缓存
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
docker search 限制
站内搜不到镜像
离线 save/load
插件要用 plugin install
WSL 拉取慢
安全与 digest
新手拉取配置
镜像合规机制
不支持 push
manifest unknown
no matching manifest(架构)
invalid tar header(解压)
TLS 证书失败
DNS 超时
域名连通性排查
410 Gone 排查
402 与流量用尽
401 认证失败
429 限流
D-Bus 凭证提示
413 与超大单层
来自真实用户的反馈,见证轩辕镜像的优质服务