轩辕镜像 官方专业版
轩辕镜像
专业版
轩辕镜像 官方专业版
轩辕镜像
专业版
首页个人中心搜索镜像
交易
充值流量¥7起我的订单
文档
工具
提交工单页面收录
chrome

browserless/chrome

browserless
自动构建

在Docker中部署无头Chrome,支持Puppeteer、Selenium和Playwright等库,提供REST API用于数据采集、PDF生成等功能。可在官方云服务运行或自行部署,非商业用途免费。

256 次收藏下载次数: 0状态:自动构建维护者:browserless仓库类型:镜像最近更新:2 年前
让 AI 帮你使用轩辕镜像? · 展开查看说明 · 点击收起说明

如果你使用 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 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。

DockerHub 官方简介
轩辕镜像中文简介
下载命令
镜像标签列表与下载命令
使用轩辕镜像,把时间还给真正重要的事。
点击查看

!https://img.shields.io/docker/pulls/browserless/chrome !https://flat.badgen.net/badge/-/dependabot?icon=dependabot&label&color=green

NOTE: This is the old v1 of Browserless. We would recommend using https://github.com/browserless/browserless instead.

Browserless allows remote clients to connect and execute headless work, all inside of docker. It supports the standard, unforked Puppeteer, Selenium and Playwright libraries, as well offering REST-based APIs for common actions like data collection, PDF generation and more.

It takes care of common issues such as missing system-fonts, missing external libraries, and performance improvements, along with edge-cases like downloading files and managing sessions. For details, check out the documentation at browserless.io/docs/docker-quickstart.

If you've been struggling to deploy headless browsers without running into issues or bloated resource requirements, then Browserless was built for you. Run the browsers in our cloud or on your own, https://github.com/browserless/browserless#licensing.

Table of Contents

  1. Features
  2. How it works
  3. Docker
  4. Using the debuggers
  5. Recommended NGINX Config
  6. Hosting
  7. Using with puppeteer
  8. Using with selenium
  9. Using with playwright
  10. Licensing
  11. https://github.com/browserless/chrome/blob/master/CHANGELOG.md

External links

  1. Full documentation site
  2. Live Debugger (using browserless.io)
  3. https://github.com/browserless/browserless
  4. Slack

Features

  • Parallelism and queueing are built-in and configurable.
  • Fonts and emoji's working out-of-the-box.
  • Debug Viewer for actively viewing/debugging running sessions.
  • Docker releases that are built for specific puppeteer versions.
  • Docker image's are labelled with information on the version of Chrome, V8, webkit and more.
  • An interactive puppeteer debugger, so you can see what the headless browser is doing and use its DevTools.
  • Works with most headless libraries.
  • Configurable session timers and health-checks to keep things running smoothly.
  • Error tolerant: if Chrome dies it won't.
  • Support for running and development on Apple's M1 machines

How it works

browserless listens for both incoming websocket requests, generally issued by most libraries, as well as pre-build REST APIs to do common functions (PDF generation, images and so on). When a websocket connects to browserless it invokes Chrome and proxies your request into it. Once the session is done then it closes and awaits for more connections. Some libraries use Chrome's HTTP endpoints, like /json to inspect debug-able targets, which browserless also supports.

Your application still runs the script itself (much like a database interaction), which gives you total control over what library you want to choose and when to do upgrades. This is preferable over other solutions as Chrome is still breaking their debugging protocol quite frequently.

Docker

See more options on our full documentation site.

  1. docker run -p 3000:3000 browserless/chrome
  2. Visit http://localhost:3000/ to use the interactive debugger.
  3. See more at our https://hub.docker.com/r/browserless/chrome/.

Live Debugger

!https://raw.githubusercontent.com/browserless/chrome/master/assets/demo.gif

browserless comes with two methods of debugging. The first is a web-based debugger for trying out small chunks of code without setting up a new project. You can see our public-facing debugger here.

The second method is an active-session debugger. When browserless runs http requests, and puppeteer sessions, it keeps track of some browser state, and makes those sessions available for debugging. You can simply load the web-based debugger in the browser, and click the menu icon in the top-left. It'll reveal all currently running sessions and a link to "view" them in Chrome's remote devtools. You can also query the /session API to get a JSON representation of sessions as well.

If you're using the active-session debugger, and it's executing too fast, you can apply a ?pause query parameter to your puppeteer.connect call (or HTTP REST calls) and browserless will pause your script until the debugger connects. This way you don't miss any critical actions!

browserless ships with an interactive debugger that makes writing scripts faster and interactive. You can use things like debugger; and console.log to capture what's happening on the page while your script is running. All of the Chrome devtools are there at your disposal. A small list of features includes:

  • Using debugging concepts like debugger; and console.log
  • Errors in the script are caught and show up in the console tab
  • You can inspect the DOM, watch network requests, and even see how the page is rendering
  • Coming soon you'll be able to export the script which will produce a index.js and a package.json to get things going

Recommended NGINX Config

If you're using nginx in front of the docker image (or Node) then you'll need to proxy through Upgrade headers. Below is an example of a location block that does such:

location / {
    proxy_pass YOUR_DOCKER_IMAGE_LOCATION;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection 'upgrade';
    proxy_set_header Host $host;
    proxy_cache_bypass $http_upgrade;
  }

Building for ARM64 (Apple M1 Machines)

TL;DR You can simply pull our M1 specific builds:

sh
docker pull browserless/chrome:1-arm64

Fist, if you're on a amd64 machine (non-M1 Mac) you'll need to setup multi-platform builds. There's a lot of good resources out there to read about this, however you'll need to ensure you're on the latest docker with experimental features enabled.

sh
# Setup the machine to build arm64
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes

# Create a builder to handle arm64 builds
docker buildx create --name builder --driver docker-container --use

# Setup the builder to get started
docker buildx inspect --bootstrap

Once complete, you can specify a platform target and build against it. In our production tags, we build a special 1-arm64 tag, which is what we'll use in the example below.

sh
docker buildx build --platform linux/arm64 -t browserless/chrome:arm64 .

In order to support arm64 inside of docker, we utilize some functionality inside of playwright to download an arm64 linux build. Since most distributions out there don't have an arm64-specific build Chromium, this means that puppeteer's chromium doesn't exist for arm64 (as far as we're aware). This, in short, means that the chromium version inside of the arm builds isn't matched exactly for the version of puppeteer that it comes bundled with. Most of the time this will go unnoticed, however if you have an issue it's possible that it's because the version of chromium in the arm64-builds isn't an exact match.

Hosting Providers

We offer a first-class hosted product located here. Alternatively you can host this image on just about any major platform that offers hosting for docker. The hosted service takes care of all the machine provisioning, notifications, dashboards and monitoring plus more:

  • Easily upgrade and toggle between versions at the press of a button. No managing repositories and other code artifacts.
  • Never need to update or pull anything from docker. There's literally zero software to install to get started.
  • Scale your consumption up or down with different plans. We support up to thousands of concurrent sessions at a given time.

If you're interested in using this image for commercial aspects, then please read the below section on licensing.

Puppeteer

Puppeteer allows you to specify a remote location for chrome via the browserWSEndpoint option. Setting this for browserless is a single line of code change.

Before

js
const browser = await puppeteer.launch();

After

js
const browser = await puppeteer.connect({ browserWSEndpoint: 'ws://localhost:3000' });

Webdriver (selenium)

Getting started with Selenium and webdriver couldn't be easier. Once browserless is up and running simply update your application or test to use it as a remote connection:

Before

js
const webdriver = require('selenium-webdriver');
const fs = require('fs');

const chromeCapabilities = webdriver.Capabilities.chrome();
chromeCapabilities.set(
  'chromeOptions', {
    args: [
      '--headless',
      '--no-sandbox',
    ],
  }
);

const driver = new webdriver.Builder()
  .forBrowser('chrome')
  .withCapabilities(chromeCapabilities)
  .build();

After

js
const webdriver = require('selenium-webdriver');
const fs = require('fs');

const chromeCapabilities = webdriver.Capabilities.chrome();
chromeCapabilities.set(
  'chromeOptions', {
    args: [
      '--headless',
      '--no-sandbox',
    ],
  }
);

const driver = new webdriver.Builder()
  .forBrowser('chrome')
  .withCapabilities(chromeCapabilities)
  .usingServer('http://localhost:3000/webdriver') // <-- Apply usingServer and that's it
  .build();

Playwright

We support running with playwright via their remote connection method on the chromium interface. Since playwright is very similar to puppeteer, even launch arguments and other things "just work":

Before

js
const browser = await pw.chromium.launch();

After

js
const browser = await pw.chromium.connect({
  browserWSEndpoint: 'wss://chrome.browserless.io?token=YOUR-API-TOKEN',
});

After that, the rest of your code remains the same with no other changes required.

Usage with other libraries

Most libraries allow you to specify a remote instance of Chrome to interact with. They are either looking for a websocket endpoint, a host and port, or some address. Browserless supports these by default, however if you're having issues please make an issue in this project and we'll try and work with the library authors to get them integrated with browserless.

You can find a much larger list of supported libraries on our documentation site.

Motivations

Running Chrome on lambda is a fantastic idea but in practice is quite challenging. You're met with pretty tough upload limits, building Chrome yourself, and then dealing with odd invocation issues should everything else go ok. A lot of issues in various repositories are due to just challenges of getting Chrome running smoothly in AWS (see https://github.com/GoogleChrome/puppeteer/issues?q=is%3Aissue+is%3Aopen+sort%3Acomments-desc). You can see for yourself by going to nearly any library and sorting issues by most commented.

Getting Chrome running well in docker is also a challenge as there's quiet a few packages you need in order to get Chrome running. Once that's done then there's still missing fonts, getting libraries to work with it, and having limitations on service reliability.

All of these issues prompted me to build a first-class image and workflow for interacting with Chrome in a more streamlined way. With browserless you never have to worry about fonts, extra packages, library support, or anything else. It should just work. On top of that it comes with a prescribed approach on how you interact with Chrome, which is through socket connections (similar to a database or any other external appliance). What this means is that you get the ability to drive Chrome remotely without having to do updates/releases to the thing that runs Chrome since it's divorced from your application.

Licensing

If you want to use browserless to build commercial sites, applications, or in a continuous-integration system that's closed-source then you'll need to purchase a commercial license. This allows you to keep your software proprietary whilst still using browserless. You can purchase a commercial license here. A commercial license grants you:

  • Priority support on issues and features.
  • On-premise running as well as running on public cloud providers for commercial/CI purposes for proprietary systems.
  • Ability to modify the source (forking) for your own purposes.

Not only does it grant you a license to run such a critical piece of infrastructure, but you are also supporting further innovation in this space and our ability to contribute to it!

If you are creating an open source application under a license compatible with the GNU GPL license v3, you may use browserless under the terms of the GPLv3. You can read more about this license https://www.gnu.org/licenses/quick-guide-gplv3.en.html.

镜像拉取方式

您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。

轩辕镜像加速拉取命令点我查看更多 chrome 镜像标签

docker pull docker.xuanyuan.run/browserless/chrome:<标签>

使用方法:

  • 登录认证方式
  • 免认证方式

DockerHub 原生拉取命令

docker pull browserless/chrome:<标签>

轩辕镜像配置手册

按平台快速找到配置文档

一键安装

一键安装 Docker

Linux Docker 一键安装

AI

用 AI 使用轩辕镜像

agents.md · AI 对话 · 提示词

Docker

登录仓库拉取

登录认证 · 私有仓库

专属域名拉取

免登录 · 高速拉取

Linux

Docker 镜像配置

Windows / Mac

Docker Desktop 配置

MacOS OrbStack

OrbStack 容器

Apple Container

macOS 原生容器

Docker Compose

Compose 项目配置

NAS

群晖

Synology 配置

飞牛

fnOS 镜像配置

绿联

绿联 NAS

威联通

QNAP 配置

极空间

极空间 NAS

Unraid

Unraid NAS

企业仓库

其他仓库

ghcr · Quay · nvcr

Harbor 镜像源

Proxy Repository 对接

Portainer 镜像源

Registries 配置

Nexus 镜像源

Docker Proxy 缓存

开发工具

Dev Containers

VS Code 开发容器

Podman

Podman 配置指南

Singularity / Apptainer

HPC 科学计算容器

Kubernetes

K8s Containerd

Kubernetes · Containerd

K3s

轻量级集群

面板 / 网络

爱快路由

爱快 4.0 · iKuai 镜像加速

宝塔面板

一键配置镜像源

需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单

镜像拉取常见问题

功能

版本功能对比

功能对比 · 版本选择

支持的镜像仓库

Docker Hub · GCR · GHCR

专属域名用法

专属域名 · 开启停用 · 多仓库

新手拉取配置

登录 · 专属域名 · 配置

docker search 限制

专属域名 · Hub 搜索

不支持 push

仅支持 pull · 不支持

拉取速度原因

带宽 · 缓存 · 冷热镜像

错误码

402 与流量用尽

402 · 流量包 · 充值

401 认证失败

401 · docker login

manifest unknown

标签错误 · 镜像不存在

410 Gone 排查

410 · Docker 升级

429 限流

免费版 · 专业版 · 企业版 · 请求频率

其他报错

DNS 超时

DNS 解析 · 网络超时

TLS 证书失败

no matching manifest(架构)

账号

失败是否计费

manifest · blob · 计费

申请开票(企业 / 个人)

开票 · 发票 · 工单

修改登录密码

网站 · 仓库 · 重置

注销账户

工单 · 数据 · 注销

原理

mirrors 不生效

daemon.json · 重启

去掉域名前缀

docker tag · 重命名

指定架构拉取

ARM64 · AMD64 · 多架构

latest 与「最新」

digest · 版本号 · 标签

查看全部问题→

用户好评

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

用户头像

oldzhang

运维工程师

Linux服务器

5

"Docker访问体验非常流畅,大镜像也能快速完成下载。"

轩辕镜像
镜像详情
...
browserless/chrome
定价查看流量套餐与价格
博客Docker 镜像公告与技术博客
专业版 · 高速稳定拉取镜像
高速镜像下载·在线技术支持·99.95% SLA 保障·付费会员免广告
50GB 仅 ¥7/年
专业版 · 高速稳定拉取镜像
50GB 仅 ¥7/年
高速镜像下载·在线技术支持·99.95% SLA 保障·付费会员免广告
用户协议·隐私政策·增值电信业务经营许可证:浙B2-20261007·©2024-2026 源码跳动©2024-2026 杭州源码跳动科技有限公司·商务合作:点击复制邮箱

更多 chrome 镜像推荐

linuxserver/chrome logo

linuxserver/chrome

LinuxServer.io 社区镜像
LinuxServer提供的Chrome浏览器容器镜像,用于在隔离环境中运行Chrome,支持网页测试、自动化操作及服务器端网页渲染等场景。
10 次收藏5万+ 次下载
7 天前更新
selenoid/chrome logo

selenoid/chrome

selenoid
Chrome images for Selenoid
58 次收藏1000万+ 次下载
1 年前更新
siomiz/chrome logo

siomiz/chrome

siomiz
Google Chrome via VNC (or via Chrome Remote Desktop - one-time setup req'd via VNC)
76 次收藏10万+ 次下载
2 年前更新
elastestbrowsers/chrome logo

elastestbrowsers/chrome

elastestbrowsers
包含完整X11环境的Chrome浏览器镜像,用于配合Selenoid进行测试,支持latest、beta和unstable版本,内置noVNC和VNC,可进行会话录制。
2 次收藏10万+ 次下载
4 年前更新
tekfik/chrome logo

tekfik/chrome

tekfik
该Docker镜像基于CentOS7构建,可在容器内运行Google Chrome浏览器,并通过3000端口提供外部访问服务,满足隔离环境下的浏览器使用需求。
10万+ 次下载
6 年前更新
playwright/chrome logo

playwright/chrome

playwright
用于Moon软件的Playwright Chrome镜像
6 次收藏10万+ 次下载
9 个月前更新

查看更多 chrome 相关镜像

更多相关 Docker 镜像与资源

以下是 browserless/chrome 相关的常用 Docker 镜像,适用于 不同场景 等不同场景:

  • linuxserver/chrome Docker 镜像说明(Chrome 浏览器,LinuxServer 容器化版本)
  • playwright/chrome Docker 镜像说明(Playwright Chrome 浏览器,适合 E2E 自动化测试与爬虫)
  • jlesage/firefox Docker 镜像说明(Firefox 浏览器,容器化版本,支持远程访问)
  • kasmweb/firefox Docker 镜像说明(Firefox 浏览器,KasmWeb 容器化版本)
  • linuxserver/firefox Docker 镜像说明(Firefox 浏览器,LinuxServer 容器化版本)