Docker image with all operating system dependencies and some pre-installed browsers, but NOT Cypress itself. See cypress/included images if you need Cypress pre-installed in the image.
cypress/browsers
images are available for Linux/amd64
and Linux/arm64
platforms.
Linux/arm64
images do not currently contain additional browsers.
cypress/browsers images on Cypress on Docker Hub use image tags in the form:
node-<node version>-chrome-<chrome version>-ff-<firefox version>-edge-<edge version>
<node version>
This is a moveable short-form convenience tag, equivalent to the above full tag.latest
for example:
cypress/browsers:node-20.14.0-chrome-125.0.6422.141-1-ff-126.0.1-edge-125.0.2535.85-1
cypress/browsers:22.11.0
cypress/browsers:latest
To avoid unplanned breaking changes, specify a fixed <node version>
& <browser version>
combination tag.
The short-form <node version>
convenience tag is linked to the latest image release for the named Node.js version. The contents of the image may be updated with newer browser versions without notice when they are released. cypress/browsers:22.11.0
is the first image with a cypress/browsers
short-form tag. Previously published cypress/browsers
images do not have the short-form tag available.
The latest
tag is linked to the latest released cypress/browsers
image for the Node.js Active LTS version and is updated without notice.
When running a container from a cypress/browsers
image, bash
is executed, as defined by the CMD parameter of the image.
In this example we first run the unchanged image cypress/browsers
as a container:
cd examples/basic # Use a pre-configured simple Cypress E2E project
npm ci # Install Cypress
docker run -it --rm -v .:/app -w /app cypress/browsers # Run image as container
At the bash
prompt :/app#
, we can then enter the following commands:
npx cypress install # Install Cypress binary into running Docker container
npx cypress run -b chrome # Run Cypress test in Chrome
In this example we use a customized Dockerfile
which bases a new image on cypress/browsers
, copies the complete Cypress project into the image, including installed dependencies, then installs the Cypress binary.
The file is examples/basic/Dockerfile.browsers and it has the following contents:
FROM cypress/browsers
COPY . /opt/app
WORKDIR /opt/app
RUN npx cypress install # Install Cypress binary into image
We build the new image, run the container from the image and execute the Cypress command npx cypress run -b chrome
to run the test using the Chrome browser:
cd examples/basic # Use a pre-configured simple Cypress E2E project
npm ci # Install Cypress
docker build . -f Dockerfile.browsers -t test-browsers # Build a new image
docker run -it --rm --entrypoint bash test-browsers -c "npx cypress run -b chrome" # Run Cypress test in container using Chrome