Skip to content

Commit f272473

Browse files
committed
chore: add internal 18.17.1 chrome 128 and firefox 130 image. Additionally updates browsers in docker factory for end users.
1 parent dc421e7 commit f272473

File tree

5 files changed

+116
-3
lines changed

5 files changed

+116
-3
lines changed
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# build this image with command
2+
# docker build -t cypress/browsers-internal:node18.17.1-chrome128-ff130 --platform linux/amd64 .
3+
#
4+
FROM cypress/base-internal:18.17.1
5+
6+
USER root
7+
8+
RUN node --version
9+
10+
COPY ./global-profile.sh /tmp/global-profile.sh
11+
RUN cat /tmp/global-profile.sh >> /etc/bash.bashrc && rm /tmp/global-profile.sh
12+
13+
# Install dependencies
14+
RUN apt-get update && \
15+
apt-get install -y \
16+
fonts-liberation \
17+
git \
18+
libcurl4 \
19+
libcurl3-gnutls \
20+
libcurl3-nss \
21+
xdg-utils \
22+
wget \
23+
curl \
24+
# chrome dependencies
25+
libu2f-udev \
26+
# firefox dependencies
27+
bzip2 \
28+
# add codecs needed for video playback in firefox
29+
# https://github.com/cypress-io/cypress-docker-images/issues/150
30+
mplayer \
31+
\
32+
# clean up
33+
&& rm -rf /var/lib/apt/lists/* \
34+
&& apt-get clean
35+
36+
# install libappindicator3-1 - not included with Debian 11
37+
RUN wget --no-verbose /usr/src/libappindicator3-1_0.4.92-7_amd64.deb "http://ftp.us.debian.org/debian/pool/main/liba/libappindicator/libappindicator3-1_0.4.92-7_amd64.deb" && \
38+
dpkg -i /usr/src/libappindicator3-1_0.4.92-7_amd64.deb ; \
39+
apt-get install -f -y && \
40+
rm -f /usr/src/libappindicator3-1_0.4.92-7_amd64.deb
41+
42+
# install Chrome browser
43+
RUN node -p "process.arch === 'arm64' ? 'Not downloading Chrome since we are on arm64: https://crbug.com/677140' : process.exit(1)" || \
44+
(wget --no-verbose -O /usr/src/google-chrome-stable_current_amd64.deb "http://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_128.0.6613.137-1_amd64.deb" && \
45+
dpkg -i /usr/src/google-chrome-stable_current_amd64.deb ; \
46+
apt-get install -f -y && \
47+
rm -f /usr/src/google-chrome-stable_current_amd64.deb)
48+
49+
# "fake" dbus address to prevent errors
50+
# https://github.com/SeleniumHQ/docker-selenium/issues/87
51+
ENV DBUS_SESSION_BUS_ADDRESS=/dev/null
52+
53+
# install Firefox browser
54+
RUN node -p "process.arch === 'arm64' ? 'Not downloading Firefox since we are on arm64: https://bugzilla.mozilla.org/show_bug.cgi?id=1678342' : process.exit(1)" || \
55+
(wget --no-verbose -O /tmp/firefox.tar.bz2 https://download-installer.cdn.mozilla.net/pub/firefox/releases/130.0.1/linux-x86_64/en-US/firefox-130.0.1.tar.bz2 && \
56+
tar -C /opt -xjf /tmp/firefox.tar.bz2 && \
57+
rm /tmp/firefox.tar.bz2 && \
58+
ln -fs /opt/firefox/firefox /usr/bin/firefox)
59+
60+
# versions of local tools
61+
RUN echo " node version: $(node -v) \n" \
62+
"npm version: $(npm -v) \n" \
63+
"yarn version: $(yarn -v) \n" \
64+
"debian version: $(cat /etc/debian_version) \n" \
65+
"Chrome version: $(google-chrome --version) \n" \
66+
"Firefox version: $(firefox --version) \n" \
67+
"Edge version: n/a \n" \
68+
"git version: $(git --version) \n" \
69+
"whoami: $(whoami) \n"
70+
71+
# a few environment variables to make NPM installs easier
72+
# good colors for most applications
73+
ENV TERM=xterm
74+
# avoid million NPM install messages
75+
ENV npm_config_loglevel=warn
76+
# allow installing when the main user is root
77+
ENV npm_config_unsafe_perm=true
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# cypress/browsers-internal:node18.17.1-chrome128-ff130
2+
3+
A complete image with all operating system dependencies for Cypress, and Chrome 128.0.6613.137-1, Firefox 130.0.1 browsers.
4+
5+
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:
6+
7+
#### Dependency Additions
8+
9+
- curl
10+
- build-essentials (to contain `make` and a few other dependencies)
11+
12+
#### Env variables
13+
14+
- Does not contain the `CACHE_FOLDER` and `FACTORY_DEFAULT_NODE_VERSION` env variables to keep unit tests non environment specific
15+
16+
[Dockerfile](Dockerfile)
17+
18+
**Note:** this image uses the `root` user. You might want to switch to non-root user like `node` when running this container for security
19+
20+
**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/issues/695 for more information.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
set e+x
2+
3+
LOCAL_NAME=cypress/browsers-internal:node18.17.1-chrome128-ff130
4+
echo "Building $LOCAL_NAME"
5+
docker build -t $LOCAL_NAME .
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
if [[ "$(uname -a)" = *"arm"* || "$(uname -a)" = *"aarch64"* ]]; then
2+
printf "\e[31m" # red
3+
echo "Warning: You are using the beta Arm build of a cypress/browsers or cypress/included image."
4+
echo
5+
echo "On Arm, non-Electron browsers are not available, because browser vendors are not yet building for Linux arm64."
6+
echo "You must use the built-in Electron browser (--browser electron) to run Cypress or find and install unofficial Arm binary builds."
7+
echo
8+
echo "More details and links to upstream issues for Chrome, Firefox, and Edge can be found at Cypress's issue tracker:"
9+
echo " https://github.com/cypress-io/cypress-docker-images/issues/695"
10+
printf "\e[0m" # reset
11+
fi

factory/.env

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@ NODE_VERSION="${FACTORY_DEFAULT_NODE_VERSION}"
2121
FACTORY_VERSION='4.2.0'
2222

2323
# Chrome versions: https://www.ubuntuupdates.org/package/google_chrome/stable/main/base/google-chrome-stable
24-
CHROME_VERSION='128.0.6613.119-1'
24+
CHROME_VERSION='128.0.6613.137-1'
2525

2626
# Cypress versions: https://www.npmjs.com/package/cypress
2727
CYPRESS_VERSION='13.14.2'
2828

2929
# Edge versions: https://packages.microsoft.com/repos/edge/pool/main/m/microsoft-edge-stable/
30-
EDGE_VERSION='128.0.2739.63-1'
30+
EDGE_VERSION='128.0.2739.67-1'
3131

3232
# Firefox versions: https://download-installer.cdn.mozilla.net/pub/firefox/releases/
33-
FIREFOX_VERSION='130.0'
33+
FIREFOX_VERSION='130.0.1'
3434

3535
# Yarn versions: https://www.npmjs.com/package/yarn and
3636
# https://classic.yarnpkg.com/latest-version

0 commit comments

Comments
 (0)