Skip to content

Commit c8d1f35

Browse files
authored
Merge branch 'master' into fix/edge-install
2 parents d357f41 + 076e645 commit c8d1f35

File tree

12 files changed

+339
-0
lines changed

12 files changed

+339
-0
lines changed
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# build it with command
2+
# docker build -t cypress/base-internal:22.18.0-bullseye --platform linux/amd64 .
3+
#
4+
FROM node:22.18.0-bullseye-slim
5+
6+
RUN apt-get update && \
7+
apt-get install --no-install-recommends -y \
8+
libgtk2.0-0 \
9+
libgtk-3-0 \
10+
libnotify-dev \
11+
libgconf-2-4 \
12+
libgbm-dev \
13+
libnss3 \
14+
libxss1 \
15+
libasound2 \
16+
libxtst6 \
17+
procps \
18+
xauth \
19+
xvfb \
20+
build-essential \
21+
# install text editors
22+
vim-tiny \
23+
nano \
24+
# install emoji font
25+
fonts-noto-color-emoji \
26+
# install Chinese fonts
27+
# this list was copied from https://github.com/jim3ma/docker-leanote
28+
fonts-arphic-bkai00mp \
29+
fonts-arphic-bsmi00lp \
30+
fonts-arphic-gbsn00lp \
31+
fonts-arphic-gkai00mp \
32+
fonts-arphic-ukai \
33+
fonts-arphic-uming \
34+
ttf-wqy-zenhei \
35+
ttf-wqy-microhei \
36+
xfonts-wqy \
37+
# clean up
38+
&& rm -rf /var/lib/apt/lists/* \
39+
&& apt-get clean
40+
41+
USER root
42+
43+
RUN node --version
44+
45+
# Install dependencies
46+
RUN apt-get update && \
47+
apt-get install -y \
48+
fonts-liberation \
49+
git \
50+
libcurl4 \
51+
libcurl3-gnutls \
52+
libcurl3-nss \
53+
libvulkan1 \
54+
xdg-utils \
55+
wget \
56+
# needed for circle orb browsers to install firefox
57+
gpg \
58+
# needed for circle orb browsers to install chromedriver
59+
jq \
60+
curl \
61+
# chrome dependencies
62+
libu2f-udev \
63+
# firefox dependencies
64+
bzip2 \
65+
# add codecs needed for video playback in firefox
66+
# https://github.com/cypress-io/cypress-docker-images/issues/150
67+
mplayer \
68+
\
69+
# clean up
70+
&& rm -rf /var/lib/apt/lists/* \
71+
&& apt-get clean
72+
73+
# install libappindicator3-1 - not included with Debian 11
74+
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" && \
75+
dpkg -i /usr/src/libappindicator3-1_0.4.92-7_amd64.deb ; \
76+
apt-get install -f -y && \
77+
rm -f /usr/src/libappindicator3-1_0.4.92-7_amd64.deb
78+
79+
# a few environment variables to make NPM installs easier
80+
# good colors for most applications
81+
ENV TERM=xterm
82+
# avoid million NPM install messages
83+
ENV npm_config_loglevel=warn
84+
85+
RUN npm --version \
86+
&& npm install -g yarn@latest --force \
87+
&& yarn --version \
88+
&& node -p process.versions \
89+
&& node -p 'module.paths' \
90+
&& echo " node version: $(node -v) \n" \
91+
"npm version: $(npm -v) \n" \
92+
"yarn version: $(yarn -v) \n" \
93+
"debian version: $(cat /etc/debian_version) \n" \
94+
"user: $(whoami) \n"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# cypress/base-internal:22.18.0-bullseye
2+
3+
A Docker image with all dependencies pre-installed.
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+
- xauth (to run xvfb inside system-tests)
10+
- build-essential to install `make` and other linux build packages
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
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
set e+x
3+
4+
# build image with Cypress dependencies
5+
LOCAL_NAME=cypress/base-internal:22.18.0-bullseye
6+
7+
echo "Building $LOCAL_NAME"
8+
docker build -t $LOCAL_NAME . --platform linux/amd64
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# build it with command
2+
# docker build -t cypress/base-internal:22.18.0-glibc-2.31 --platform linux/amd64 .
3+
#
4+
FROM cypress/base-internal:22.18.0-bullseye
5+
6+
RUN apt-get update && \
7+
apt-get install -y \
8+
wget \
9+
xz-utils \
10+
bzip2 \
11+
make \
12+
autoconf \
13+
gcc-multilib \
14+
g++-multilib \
15+
# clean up
16+
&& rm -rf /var/lib/apt/lists/* \
17+
&& apt-get clean
18+
19+
# # Install Python 3.8
20+
# # Bullseye comes with 3.9, so we need to downgrade
21+
RUN wget https://www.python.org/ftp/python/3.8.0/Python-3.8.0.tgz
22+
RUN tar xvf Python-3.8.0.tgz
23+
RUN cd Python-3.8.0 && ./configure --enable-optimizations --prefix=/usr && make altinstall
24+
RUN rm /usr/bin/python3 && ln -s /usr/bin/python3.8 /usr/bin/python3
25+
# # Clean up
26+
RUN rm -rf Python-3.8.0 Python-3.8.0.tgz
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# cypress/base-internal:22.18.0-bullseye-glibc2.31
2+
3+
A Docker image with all dependencies pre-installed. This image is labeled separately from the other bullseye images, because it is used in a specific step in the Cypress CI process. As a part of the build process, Cypress' CI builds an optimized version of `better-sqlite3`'s addon. The range of operating systems this addon can be used in is determined by the glibc version of the system that builds it.
4+
5+
This image is labeled according the the glibc version so that the Cypress CI pipeline is more self-documenting when it comes to the minimum glibc version required to run Cypress.
6+
7+
It may require additional dependencies for this build process; for example, in Buster, we needed
8+
to upgrade both Python and GCC. In Bullseye, we need to downgrade Python.
9+
10+
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:
11+
12+
#### Dependency Additions
13+
14+
- xauth (to run xvfb inside system-tests)
15+
- build-essential to install `make` and other linux build packages
16+
- python3.8 to be able to build better-sqlite3
17+
18+
#### Env variables
19+
20+
- Does not contain the `CACHE_FOLDER` and `FACTORY_DEFAULT_NODE_VERSION` env variables to keep unit tests non environment specific
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
set e+x
2+
3+
# build image with Cypress dependencies
4+
LOCAL_NAME=cypress/base-internal:22.18.0-bullseye-glibc-2.31
5+
6+
echo "Building $LOCAL_NAME"
7+
docker build -t $LOCAL_NAME . --platform linux/amd64
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# build it with command
2+
# docker build -t cypress/base-internal:22.18.0-yarn-berry --platform linux/amd64 .
3+
#
4+
FROM node:22.18.0-bookworm-slim
5+
6+
RUN apt-get update && \
7+
apt-get install --no-install-recommends -y \
8+
libgtk2.0-0 \
9+
libgtk-3-0 \
10+
libnotify-dev \
11+
libgconf-2-4 \
12+
libgbm-dev \
13+
libnss3 \
14+
libxss1 \
15+
libasound2 \
16+
libxtst6 \
17+
procps \
18+
xauth \
19+
xvfb \
20+
build-essential \
21+
# install text editors
22+
vim-tiny \
23+
nano \
24+
wget \
25+
curl \
26+
git \
27+
# install emoji font
28+
fonts-noto-color-emoji \
29+
# install Chinese fonts
30+
# this list was copied from https://github.com/jim3ma/docker-leanote
31+
fonts-arphic-bkai00mp \
32+
fonts-arphic-bsmi00lp \
33+
fonts-arphic-gbsn00lp \
34+
fonts-arphic-gkai00mp \
35+
fonts-arphic-ukai \
36+
fonts-arphic-uming \
37+
ttf-wqy-zenhei \
38+
ttf-wqy-microhei \
39+
xfonts-wqy \
40+
# clean up
41+
&& rm -rf /var/lib/apt/lists/* \
42+
&& apt-get clean
43+
44+
RUN apt-get update && \
45+
apt-get install --no-install-recommends -y \
46+
ca-certificates
47+
48+
# a few environment variables to make NPM installs easier
49+
# good colors for most applications
50+
ENV TERM=xterm
51+
# avoid million NPM install messages
52+
ENV npm_config_loglevel=warn
53+
# allow installing when the main user is root
54+
ENV npm_config_unsafe_perm=true
55+
# need to enable corepack to set yarn version
56+
RUN corepack enable
57+
# set the yarn version to 4 to get yarn berry, which does not install modules into node_modules
58+
RUN yarn set version 4.3.1
59+
60+
RUN npm --version \
61+
&& yarn --version \
62+
&& node -p process.versions \
63+
&& node -p 'module.paths' \
64+
&& echo " node version: $(node -v) \n" \
65+
"npm version: $(npm -v) \n" \
66+
"yarn version: $(yarn -v) \n" \
67+
"debian version: $(cat /etc/debian_version) \n" \
68+
"user: $(whoami) \n"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# cypress/base-internal:22.18.0-yarn-berry
2+
3+
A Docker image with all dependencies pre-installed, based on Debian Bookworm.
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+
- xauth (to run xvfb inside system-tests)
10+
- build-essential to install `make` and other linux build packages
11+
- has yarn 4 to test yarn PnP dependencies with Cypress in order to verify the `@cypress/webpack-batteries-included-preprocessor` works with yarn PnP (without `node_modules`)
12+
13+
#### Env variables
14+
15+
- Does not contain the `CACHE_FOLDER` and `FACTORY_DEFAULT_NODE_VERSION` env variables to keep unit tests non environment specific
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
set e+x
3+
4+
# build image with Cypress dependencies
5+
LOCAL_NAME=cypress/base-internal:22.18.0-yarn-berry
6+
7+
echo "Building $LOCAL_NAME"
8+
docker build -t $LOCAL_NAME . --platform linux/amd64
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# build it with command
2+
# docker build -t cypress/base-internal:22.18.0 --platform linux/amd64 .
3+
#
4+
FROM node:22.18.0-bookworm-slim
5+
6+
RUN apt-get update && \
7+
apt-get install --no-install-recommends -y \
8+
libgtk2.0-0 \
9+
libgtk-3-0 \
10+
libnotify-dev \
11+
libgconf-2-4 \
12+
libgbm-dev \
13+
libnss3 \
14+
libxss1 \
15+
libasound2 \
16+
libxtst6 \
17+
procps \
18+
xauth \
19+
xvfb \
20+
build-essential \
21+
# install text editors
22+
vim-tiny \
23+
nano \
24+
# install emoji font
25+
fonts-noto-color-emoji \
26+
# install Chinese fonts
27+
# this list was copied from https://github.com/jim3ma/docker-leanote
28+
fonts-arphic-bkai00mp \
29+
fonts-arphic-bsmi00lp \
30+
fonts-arphic-gbsn00lp \
31+
fonts-arphic-gkai00mp \
32+
fonts-arphic-ukai \
33+
fonts-arphic-uming \
34+
ttf-wqy-zenhei \
35+
ttf-wqy-microhei \
36+
xfonts-wqy \
37+
# clean up
38+
&& rm -rf /var/lib/apt/lists/* \
39+
&& apt-get clean
40+
41+
# a few environment variables to make NPM installs easier
42+
# good colors for most applications
43+
ENV TERM=xterm
44+
# avoid million NPM install messages
45+
ENV npm_config_loglevel=warn
46+
47+
RUN npm --version \
48+
&& npm install -g yarn@latest --force \
49+
&& yarn --version \
50+
&& node -p process.versions \
51+
&& node -p 'module.paths' \
52+
&& echo " node version: $(node -v) \n" \
53+
"npm version: $(npm -v) \n" \
54+
"yarn version: $(yarn -v) \n" \
55+
"debian version: $(cat /etc/debian_version) \n" \
56+
"user: $(whoami) \n"

0 commit comments

Comments
 (0)