Single Node/Standalone Image With All Browsers in Selenium Grid Docker #2951
Pinned
VietND96
announced in
Announcements
Replies: 1 comment
-
@VietND96 great work! 👍 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Introduction
The Selenium Docker project has reached a significant milestone with the introduction of unified container images that include all popular web browsers in a single package. Starting from version
4.35.0
, users can now leverageselenium/standalone-all-browsers
andselenium/node-all-browsers
images that come pre-installed with Chrome, Edge, Firefox, and Chromium browsers, dramatically simplifying deployment and testing workflows.This new capability addresses a long-standing need in the testing community for a more streamlined approach to cross-browser testing, eliminating the complexity of managing multiple browser-specific containers while maintaining the flexibility and power of Selenium Grid.
Background
Traditionally, Selenium Grid with Docker deployments required separate containers for each browser type:
selenium/node-chrome
for Chrome testingselenium/node-firefox
for Firefox testingselenium/node-edge
for Edge testingselenium/node-chromium
for Chromium testingselenium/standalone-chrome
,selenium/standalone-firefox
, etc. for standalone deploymentsThis approach, while providing fine-grained control and optimized resource usage, introduced several challenges:
The community had been requesting a unified solution, as evidenced by GitHub issue #2795 and the extensive discussion in GitHub discussion #2659.
Motivation
The primary motivations for developing the all-browsers images were:
Simplicity and Convenience
Many development teams and individual developers prefer the "all-in-one" approach for:
Reduced Operational Overhead
Cross-Browser Testing Efficiency
Implementation
The implementation of the all-browsers images involved significant engineering work to create a unified container that supports multiple browsers while maintaining the flexibility and reliability of individual browser containers.
Technical Approach
The development team implemented an innovative layered build approach that reuses existing Dockerfile configurations from individual browser containers. The all-browsers images are built through a sequential layering process:
node-base
as the foundationnode-base
as the base imagenode-all-browsers
image as the basenode-all-browsers
imagenode-all-browsers
imagestandalone-all-browsers
using the completednode-all-browsers
as the baseThis approach allowed for:
Key Implementation Features
Multi-Browser Installation: All supported browsers (Chrome, Edge, Firefox, and Chromium) are installed within a single container image, along with their respective WebDriver binaries.
Dynamic Configuration Generation: The system automatically detects available browsers and generates appropriate Selenium Grid node configurations based on the runtime environment and architecture.
Runtime Browser Selection: Environment variable-driven browser selection allows users to customize which browsers are active and how they behave, including the ability to switch between Chrome and Chromium binaries on supported architectures.
Architecture-Aware Deployment: The implementation includes intelligent handling of different processor architectures, ensuring that only compatible browsers are activated on each platform.
Architecture Overview
The all-browsers images are built with:
Configuration
Available Images
Two primary images are available:
selenium/standalone-all-browsers
: Complete standalone Selenium Grid with all browsersselenium/node-all-browsers
: Multi-browser node for Hub-Node grid deploymentsImage Tag Convention
The all-browsers images use a multi-tag approach, where each image is tagged with multiple version identifiers for flexibility:
Available Tags (all pointing to the same image):
latest
- Latest stable release4
- Major version tag4.35
- Major.minor version tag4.35.0
- Full semantic version4.35.0-20250828
- Full version with build dateTag Usage Examples:
# Using different tag specificity levels selenium/node-all-browsers:latest selenium/node-all-browsers:4 selenium/node-all-browsers:4.35 selenium/node-all-browsers:4.35.0 selenium/node-all-browsers:4.35.0-20250828 selenium/standalone-all-browsers:latest selenium/standalone-all-browsers:4 selenium/standalone-all-browsers:4.35 selenium/standalone-all-browsers:4.35.0 selenium/standalone-all-browsers:4.35.0-20250828
This multi-tag approach provides:
latest
for development and testingMulti-Architecture Support
Browser availability varies by architecture:
Basic Usage
Standalone Mode
Hub-Node Mode
Advanced Configuration
Browser Binary Switching
For x86_64 systems with both Chrome and Chromium available, you can switch to Chromium:
Per-Browser Customization
Each browser can be individually configured using environment variables with browser-specific suffixes. The supported environment variable prefixes are:
SE_NODE_STEREOTYPE_<BROWSER>
- Browser stereotype configurationSE_NODE_BROWSER_NAME_<BROWSER>
- Browser name overrideSE_NODE_BROWSER_VERSION_<BROWSER>
- Browser version specificationSE_NODE_PLATFORM_NAME_<BROWSER>
- Platform name configurationSE_BROWSER_BINARY_LOCATION_<BROWSER>
- Custom browser binary locationSE_NODE_STEREOTYPE_EXTRA_<BROWSER>
- Additional stereotype propertiesSE_NODE_MAX_SESSIONS_<BROWSER>
- Maximum concurrent sessions per browserWhere
<BROWSER>
can beCHROME
,FIREFOX
,EDGE
.Example configuration:
Resource Considerations
The all-browsers images are larger and consume more resources:
Target Use Cases
These images are ideal for:
Conclusion
The introduction of Single Node/Standalone Images With All Browsers represents a significant step forward in making Selenium Grid more accessible and user-friendly. By providing pre-configured, all-in-one containers, the Selenium Docker project has lowered the barrier to entry for cross-browser testing while maintaining the flexibility that advanced users require.
This feature particularly benefits:
While these images may not be suitable for every use case—particularly large-scale production deployments where resource optimization is critical—they fill an important gap in the Selenium ecosystem. The ability to switch between browser binaries and configure individual browsers provides the flexibility needed for diverse testing scenarios.
As the Selenium Docker project continues to evolve, these all-browsers images represent the project's commitment to both power users who need fine-grained control and newcomers who value simplicity and convenience. The community-driven development process, evidenced by the GitHub discussions and feature requests that led to this implementation, demonstrates the project's responsiveness to user needs.
For teams looking to streamline their cross-browser testing workflows, the new all-browsers images offer an compelling solution that balances ease of use with comprehensive browser support. As browser support continues to expand and multi-architecture compatibility improves, these images will become an even more valuable tool in the modern web testing toolkit.
For more information about Selenium Docker and the latest updates, visit the official repository
Beta Was this translation helpful? Give feedback.
All reactions