Skip to content

Commit

Permalink
chore: add internal 20.18.1 chrome 131 firefox 133 and edge image (#1266
Browse files Browse the repository at this point in the history
)
  • Loading branch information
AtofStryker authored Jan 8, 2025
1 parent c07fb74 commit e28298a
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# build this image with command
# docker build -t cypress/browsers-internal:node20.18.1-bullseye-chrome131-ff133-edge --platform linux/amd64 .
#

FROM cypress/browsers-internal:node20.18.1-bullseye-chrome131-ff133

USER root

# Install dependencies
RUN apt-get update && \
apt-get install -y \
# edge dependencies
gnupg \
dirmngr \
\
# clean up
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean

# install latest Edge
RUN node -p "process.arch === 'arm64' ? 'Not downloading Edge since we are on arm64: https://techcommunity.microsoft.com/t5/discussions/edge-for-linux-arm64/m-p/1532272' : process.exit(1)" || \
(curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg && \
install -o root -g root -m 644 microsoft.gpg /etc/apt/trusted.gpg.d/ && \
sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/edge stable main" > /etc/apt/sources.list.d/microsoft-edge-dev.list' && \
rm microsoft.gpg && \
## Install Edge
apt-get update && \
apt-get install -y microsoft-edge-dev && \
## Add a link to the browser that allows Cypress to find it
ln -s /usr/bin/microsoft-edge /usr/bin/edge)

# install pnpm
RUN npm install -g pnpm@9 --force

# versions of local tools
RUN echo " node version: $(node -v) \n" \
"npm version: $(npm -v) \n" \
"yarn version: $(yarn -v) \n" \
"pnpm version: $(pnpm -v) \n" \
"debian version: $(cat /etc/debian_version) \n" \
"Chrome version: $(google-chrome --version) \n" \
"Firefox version: $(firefox --version) \n" \
"Edge version: n/a \n" \
"git version: $(git --version) \n" \
"whoami: $(whoami) \n"

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# cypress/browsers-internal:node20.18.1-bullseye-chrome131-ff133-edge

A complete image with all operating system dependencies for Cypress, and Chrome 131.0.6778.108-1, Firefox 133.0, and Edge latest browsers.

NOTE: This image is intended for internal use with https://github.com/cypress-io/cypress. It contains a few differences from the factory, such as:

#### Dependency Additions

- curl
- build-essentials (to contain `make` and a few other dependencies)

#### Env variables

- Does not contain the `CACHE_FOLDER` and `FACTORY_DEFAULT_NODE_VERSION` env variables to keep unit tests non environment specific

[Dockerfile](Dockerfile)

**Note:** this image uses the `root` user. You might want to switch to non-root user like `node` when running this container for security

**Note:** Currently, the linux/arm64 build of this image does not contain any browsers except Electron. See https://github.com/cypress-io/cypress-docker-images/blob/master/README.md#browsers for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
set e+x

LOCAL_NAME=cypress/browsers-internal:node20.18.1-bullseye-chrome131-ff133-edge
echo "Building $LOCAL_NAME"
docker build -t $LOCAL_NAME .
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
if [[ "$(uname -a)" = *"arm"* || "$(uname -a)" = *"aarch64"* ]]; then
printf "\e[31m" # red
echo "Warning: You are using the beta Arm build of a cypress/browsers or cypress/included image."
echo
echo "On Arm, non-Electron browsers are not available, because browser vendors are not yet building for Linux arm64."
echo "You must use the built-in Electron browser (--browser electron) to run Cypress or find and install unofficial Arm binary builds."
echo
echo "More details and links to upstream issues for Chrome, Firefox, and Edge can be found in the docker image ReadMe:"
echo " https://github.com/cypress-io/cypress-docker-images/blob/master/README.md#browsers"
printf "\e[0m" # reset
fi

0 comments on commit e28298a

Please sign in to comment.