diff --git a/base-internal/releases/node-22/22.15.1-bullseye/Dockerfile b/base-internal/releases/node-22/22.15.1-bullseye/Dockerfile new file mode 100644 index 0000000000..abc74202b5 --- /dev/null +++ b/base-internal/releases/node-22/22.15.1-bullseye/Dockerfile @@ -0,0 +1,94 @@ +# build it with command +# docker build -t cypress/base-internal:22.15.1-bullseye --platform linux/amd64 . +# +FROM node:22.15.1-bullseye-slim + +RUN apt-get update && \ + apt-get install --no-install-recommends -y \ + libgtk2.0-0 \ + libgtk-3-0 \ + libnotify-dev \ + libgconf-2-4 \ + libgbm-dev \ + libnss3 \ + libxss1 \ + libasound2 \ + libxtst6 \ + procps \ + xauth \ + xvfb \ + build-essential \ + # install text editors + vim-tiny \ + nano \ + # install emoji font + fonts-noto-color-emoji \ + # install Chinese fonts + # this list was copied from https://github.com/jim3ma/docker-leanote + fonts-arphic-bkai00mp \ + fonts-arphic-bsmi00lp \ + fonts-arphic-gbsn00lp \ + fonts-arphic-gkai00mp \ + fonts-arphic-ukai \ + fonts-arphic-uming \ + ttf-wqy-zenhei \ + ttf-wqy-microhei \ + xfonts-wqy \ + # clean up + && rm -rf /var/lib/apt/lists/* \ + && apt-get clean + +USER root + +RUN node --version + +# Install dependencies +RUN apt-get update && \ + apt-get install -y \ + fonts-liberation \ + git \ + libcurl4 \ + libcurl3-gnutls \ + libcurl3-nss \ + libvulkan1 \ + xdg-utils \ + wget \ + # needed for circle orb browsers to install firefox + gpg \ + # needed for circle orb browsers to install chromedriver + jq \ + curl \ + # chrome dependencies + libu2f-udev \ + # firefox dependencies + bzip2 \ + # add codecs needed for video playback in firefox + # https://github.com/cypress-io/cypress-docker-images/issues/150 + mplayer \ + \ + # clean up + && rm -rf /var/lib/apt/lists/* \ + && apt-get clean + +# install libappindicator3-1 - not included with Debian 11 +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" && \ + dpkg -i /usr/src/libappindicator3-1_0.4.92-7_amd64.deb ; \ + apt-get install -f -y && \ + rm -f /usr/src/libappindicator3-1_0.4.92-7_amd64.deb + +# a few environment variables to make NPM installs easier +# good colors for most applications +ENV TERM=xterm +# avoid million NPM install messages +ENV npm_config_loglevel=warn + +RUN npm --version \ + && npm install -g yarn@latest --force \ + && yarn --version \ + && node -p process.versions \ + && node -p 'module.paths' \ + && echo " node version: $(node -v) \n" \ + "npm version: $(npm -v) \n" \ + "yarn version: $(yarn -v) \n" \ + "debian version: $(cat /etc/debian_version) \n" \ + "user: $(whoami) \n" \ No newline at end of file diff --git a/base-internal/releases/node-22/22.15.1-bullseye/README.md b/base-internal/releases/node-22/22.15.1-bullseye/README.md new file mode 100644 index 0000000000..059e93defa --- /dev/null +++ b/base-internal/releases/node-22/22.15.1-bullseye/README.md @@ -0,0 +1,14 @@ +# cypress/base-internal:22.15.1-bullseye + +A Docker image with all dependencies pre-installed. + +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 + +- xauth (to run xvfb inside system-tests) +- build-essential to install `make` and other linux build packages + +#### Env variables + +- Does not contain the `CACHE_FOLDER` and `FACTORY_DEFAULT_NODE_VERSION` env variables to keep unit tests non environment specific diff --git a/base-internal/releases/node-22/22.15.1-bullseye/build.sh b/base-internal/releases/node-22/22.15.1-bullseye/build.sh new file mode 100644 index 0000000000..b036f708dc --- /dev/null +++ b/base-internal/releases/node-22/22.15.1-bullseye/build.sh @@ -0,0 +1,8 @@ +#!/bin/bash +set e+x + +# build image with Cypress dependencies +LOCAL_NAME=cypress/base-internal:22.15.1-bullseye + +echo "Building $LOCAL_NAME" +docker build -t $LOCAL_NAME . --platform linux/amd64 diff --git a/base-internal/releases/node-22/22.15.1-glibc-2.31/Dockerfile b/base-internal/releases/node-22/22.15.1-glibc-2.31/Dockerfile new file mode 100644 index 0000000000..69f80b634f --- /dev/null +++ b/base-internal/releases/node-22/22.15.1-glibc-2.31/Dockerfile @@ -0,0 +1,26 @@ +# build it with command +# docker build -t cypress/base-internal:22.15.1-glibc-2.31 --platform linux/amd64 . +# +FROM cypress/base-internal:22.15.1-bullseye + +RUN apt-get update && \ + apt-get install -y \ + wget \ + xz-utils \ + bzip2 \ + make \ + autoconf \ + gcc-multilib \ + g++-multilib \ + # clean up + && rm -rf /var/lib/apt/lists/* \ + && apt-get clean + + # # Install Python 3.8 + # # Bullseye comes with 3.9, so we need to downgrade +RUN wget https://www.python.org/ftp/python/3.8.0/Python-3.8.0.tgz +RUN tar xvf Python-3.8.0.tgz +RUN cd Python-3.8.0 && ./configure --enable-optimizations --prefix=/usr && make altinstall +RUN rm /usr/bin/python3 && ln -s /usr/bin/python3.8 /usr/bin/python3 + # # Clean up +RUN rm -rf Python-3.8.0 Python-3.8.0.tgz diff --git a/base-internal/releases/node-22/22.15.1-glibc-2.31/README.md b/base-internal/releases/node-22/22.15.1-glibc-2.31/README.md new file mode 100644 index 0000000000..2139646ab0 --- /dev/null +++ b/base-internal/releases/node-22/22.15.1-glibc-2.31/README.md @@ -0,0 +1,20 @@ +# cypress/base-internal:22.15.1-bullseye-glibc2.31 + +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. + +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. + +It may require additional dependencies for this build process; for example, in Buster, we needed +to upgrade both Python and GCC. In Bullseye, we need to downgrade Python. + +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 + +- xauth (to run xvfb inside system-tests) +- build-essential to install `make` and other linux build packages +- python3.8 to be able to build better-sqlite3 + +#### Env variables + +- Does not contain the `CACHE_FOLDER` and `FACTORY_DEFAULT_NODE_VERSION` env variables to keep unit tests non environment specific diff --git a/base-internal/releases/node-22/22.15.1-glibc-2.31/build.sh b/base-internal/releases/node-22/22.15.1-glibc-2.31/build.sh new file mode 100755 index 0000000000..bfe6c42134 --- /dev/null +++ b/base-internal/releases/node-22/22.15.1-glibc-2.31/build.sh @@ -0,0 +1,7 @@ +set e+x + +# build image with Cypress dependencies +LOCAL_NAME=cypress/base-internal:22.15.1-bullseye-glibc-2.31 + +echo "Building $LOCAL_NAME" +docker build -t $LOCAL_NAME . --platform linux/amd64 diff --git a/base-internal/releases/node-22/22.15.1-yarn-berry/Dockerfile b/base-internal/releases/node-22/22.15.1-yarn-berry/Dockerfile new file mode 100644 index 0000000000..5e43d58bef --- /dev/null +++ b/base-internal/releases/node-22/22.15.1-yarn-berry/Dockerfile @@ -0,0 +1,68 @@ +# build it with command +# docker build -t cypress/base-internal:22.15.1-yarn-berry --platform linux/amd64 . +# +FROM node:22.15.1-bookworm-slim + +RUN apt-get update && \ + apt-get install --no-install-recommends -y \ + libgtk2.0-0 \ + libgtk-3-0 \ + libnotify-dev \ + libgconf-2-4 \ + libgbm-dev \ + libnss3 \ + libxss1 \ + libasound2 \ + libxtst6 \ + procps \ + xauth \ + xvfb \ + build-essential \ + # install text editors + vim-tiny \ + nano \ + wget \ + curl \ + git \ + # install emoji font + fonts-noto-color-emoji \ + # install Chinese fonts + # this list was copied from https://github.com/jim3ma/docker-leanote + fonts-arphic-bkai00mp \ + fonts-arphic-bsmi00lp \ + fonts-arphic-gbsn00lp \ + fonts-arphic-gkai00mp \ + fonts-arphic-ukai \ + fonts-arphic-uming \ + ttf-wqy-zenhei \ + ttf-wqy-microhei \ + xfonts-wqy \ + # clean up + && rm -rf /var/lib/apt/lists/* \ + && apt-get clean + +RUN apt-get update && \ + apt-get install --no-install-recommends -y \ + ca-certificates + +# a few environment variables to make NPM installs easier +# good colors for most applications +ENV TERM=xterm +# avoid million NPM install messages +ENV npm_config_loglevel=warn +# allow installing when the main user is root +ENV npm_config_unsafe_perm=true +# need to enable corepack to set yarn version +RUN corepack enable +# set the yarn version to 4 to get yarn berry, which does not install modules into node_modules +RUN yarn set version 4.3.1 + +RUN npm --version \ + && yarn --version \ + && node -p process.versions \ + && node -p 'module.paths' \ + && echo " node version: $(node -v) \n" \ + "npm version: $(npm -v) \n" \ + "yarn version: $(yarn -v) \n" \ + "debian version: $(cat /etc/debian_version) \n" \ + "user: $(whoami) \n" \ No newline at end of file diff --git a/base-internal/releases/node-22/22.15.1-yarn-berry/README.md b/base-internal/releases/node-22/22.15.1-yarn-berry/README.md new file mode 100644 index 0000000000..9bf3996c7b --- /dev/null +++ b/base-internal/releases/node-22/22.15.1-yarn-berry/README.md @@ -0,0 +1,15 @@ +# cypress/base-internal:22.15.1-yarn-berry + +A Docker image with all dependencies pre-installed, based on Debian Bookworm. + +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 + +- xauth (to run xvfb inside system-tests) +- build-essential to install `make` and other linux build packages +- 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`) + +#### Env variables + +- Does not contain the `CACHE_FOLDER` and `FACTORY_DEFAULT_NODE_VERSION` env variables to keep unit tests non environment specific diff --git a/base-internal/releases/node-22/22.15.1-yarn-berry/build.sh b/base-internal/releases/node-22/22.15.1-yarn-berry/build.sh new file mode 100644 index 0000000000..4873b95581 --- /dev/null +++ b/base-internal/releases/node-22/22.15.1-yarn-berry/build.sh @@ -0,0 +1,8 @@ +#!/bin/bash +set e+x + +# build image with Cypress dependencies +LOCAL_NAME=cypress/base-internal:22.15.1-yarn-berry + +echo "Building $LOCAL_NAME" +docker build -t $LOCAL_NAME . --platform linux/amd64 diff --git a/base-internal/releases/node-22/22.15.1/Dockerfile b/base-internal/releases/node-22/22.15.1/Dockerfile new file mode 100644 index 0000000000..e0ad91cb8f --- /dev/null +++ b/base-internal/releases/node-22/22.15.1/Dockerfile @@ -0,0 +1,56 @@ +# build it with command +# docker build -t cypress/base-internal:22.15.1 --platform linux/amd64 . +# +FROM node:22.15.1-bookworm-slim + +RUN apt-get update && \ + apt-get install --no-install-recommends -y \ + libgtk2.0-0 \ + libgtk-3-0 \ + libnotify-dev \ + libgconf-2-4 \ + libgbm-dev \ + libnss3 \ + libxss1 \ + libasound2 \ + libxtst6 \ + procps \ + xauth \ + xvfb \ + build-essential \ + # install text editors + vim-tiny \ + nano \ + # install emoji font + fonts-noto-color-emoji \ + # install Chinese fonts + # this list was copied from https://github.com/jim3ma/docker-leanote + fonts-arphic-bkai00mp \ + fonts-arphic-bsmi00lp \ + fonts-arphic-gbsn00lp \ + fonts-arphic-gkai00mp \ + fonts-arphic-ukai \ + fonts-arphic-uming \ + ttf-wqy-zenhei \ + ttf-wqy-microhei \ + xfonts-wqy \ + # clean up + && rm -rf /var/lib/apt/lists/* \ + && apt-get clean + +# a few environment variables to make NPM installs easier +# good colors for most applications +ENV TERM=xterm +# avoid million NPM install messages +ENV npm_config_loglevel=warn + +RUN npm --version \ + && npm install -g yarn@latest --force \ + && yarn --version \ + && node -p process.versions \ + && node -p 'module.paths' \ + && echo " node version: $(node -v) \n" \ + "npm version: $(npm -v) \n" \ + "yarn version: $(yarn -v) \n" \ + "debian version: $(cat /etc/debian_version) \n" \ + "user: $(whoami) \n" \ No newline at end of file diff --git a/base-internal/releases/node-22/22.15.1/README.md b/base-internal/releases/node-22/22.15.1/README.md new file mode 100644 index 0000000000..98ed54038e --- /dev/null +++ b/base-internal/releases/node-22/22.15.1/README.md @@ -0,0 +1,14 @@ +# cypress/base-internal:22.15.1 + +A Docker image with all dependencies pre-installed based on Debian Bookworm. + +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 + +- xauth (to run xvfb inside system-tests) +- build-essential to install `make` and other linux build packages + +#### Env variables + +- Does not contain the `CACHE_FOLDER` and `FACTORY_DEFAULT_NODE_VERSION` env variables to keep unit tests non environment specific diff --git a/base-internal/releases/node-22/22.15.1/build.sh b/base-internal/releases/node-22/22.15.1/build.sh new file mode 100644 index 0000000000..15c31cb336 --- /dev/null +++ b/base-internal/releases/node-22/22.15.1/build.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +set -e+x + +# build image with Cypress dependencies +LOCAL_NAME=cypress/base-internal:22.15.1 + +echo "Building $LOCAL_NAME" +docker build -t $LOCAL_NAME . --platform linux/amd64 diff --git a/base-internal/releases/ubuntu/ubuntu22-node22/Dockerfile b/base-internal/releases/ubuntu/ubuntu22-node22/Dockerfile new file mode 100644 index 0000000000..1d6f2215e6 --- /dev/null +++ b/base-internal/releases/ubuntu/ubuntu22-node22/Dockerfile @@ -0,0 +1,68 @@ +FROM ubuntu:22.04 + +RUN apt-get update && \ + apt-get install -y apt-transport-https ca-certificates curl gnupg +RUN mkdir -p /etc/apt/keyrings +RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list +RUN apt-get update && apt-get install -y nodejs=22.15.1-1nodesource1 + +# Install latest NPM and Yarn +RUN npm install -g npm@latest +RUN npm install -g yarn@latest + +# install additional native dependencies build tools +RUN apt install -y build-essential + +# install Git client +RUN apt-get install -y git +# install unzip utility to speed up Cypress unzips +# https://github.com/cypress-io/cypress/releases/tag/v3.8.0 +RUN apt-get install -y unzip + +# avoid any prompts +ENV DEBIAN_FRONTEND noninteractive +# install tzdata package +RUN apt-get install -y tzdata +# set your timezone +RUN ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime +RUN dpkg-reconfigure --frontend noninteractive tzdata + +# install Cypress dependencies (separate commands to avoid time outs) +RUN apt-get install -y \ + libatk1.0-0 \ + libgtk2.0-0 \ + libglib2.0-0 \ + libatk-bridge2.0-0 \ + libcups2 \ + libgtk-3-0 \ + libgbm1 +RUN apt-get install -y \ + libnotify-dev +RUN apt-get install -y \ + libgconf-2-4 \ + libnss3 \ + libxss1 +RUN apt-get install -y \ + libasound2 \ + xvfb + +# a few environment variables to make NPM installs easier +# good colors for most applications +ENV TERM xterm +# avoid million NPM install messages +ENV npm_config_loglevel warn +# allow installing when the main user is root +ENV npm_config_unsafe_perm true + +# versions of local tools +RUN echo " node version: $(node -v) \n" \ + "npm version: $(npm -v) \n" \ + "yarn version: $(yarn -v) \n" \ + "debian version: $(cat /etc/debian_version) \n" \ + "user: $(whoami) \n" \ + "git: $(git --version) \n" + +RUN echo "More version info" +RUN cat /etc/lsb-release +RUN cat /etc/os-release \ No newline at end of file diff --git a/base-internal/releases/ubuntu/ubuntu22-node22/README.md b/base-internal/releases/ubuntu/ubuntu22-node22/README.md new file mode 100644 index 0000000000..1926635a4c --- /dev/null +++ b/base-internal/releases/ubuntu/ubuntu22-node22/README.md @@ -0,0 +1,22 @@ +# Ubuntu 22.04 with Node.js 22.15.1 + +This is a base image for Cypress that includes: + +- Ubuntu 22.04 +- Node.js 22.15.1 +- Latest NPM +- Latest Yarn +- Git +- All Cypress dependencies + +## Usage + +```bash +docker pull cypress/base-internal:ubuntu22-node22 +``` + +## Build + +```bash +./build.sh +``` diff --git a/base-internal/releases/ubuntu/ubuntu22-node22/build.sh b/base-internal/releases/ubuntu/ubuntu22-node22/build.sh new file mode 100644 index 0000000000..f448e353c4 --- /dev/null +++ b/base-internal/releases/ubuntu/ubuntu22-node22/build.sh @@ -0,0 +1,4 @@ +#!/bin/bash +set -e + +docker build -t cypress/base-internal:ubuntu22-node22 . \ No newline at end of file diff --git a/base-internal/releases/ubuntu/ubuntu24-node22/Dockerfile b/base-internal/releases/ubuntu/ubuntu24-node22/Dockerfile new file mode 100644 index 0000000000..75e408948f --- /dev/null +++ b/base-internal/releases/ubuntu/ubuntu24-node22/Dockerfile @@ -0,0 +1,78 @@ +FROM ubuntu:24.04 + +# set up NodeJS +RUN apt-get update && \ + apt-get install -y apt-transport-https ca-certificates curl gnupg +RUN mkdir -p /etc/apt/keyrings +RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list +RUN apt-get update && apt-get install -y nodejs=22.15.1-1nodesource1 + +# set up Python 3.11 +RUN apt-get install software-properties-common -y +RUN add-apt-repository ppa:deadsnakes/ppa +RUN apt-get update && apt-get upgrade -y +RUN apt-get install g++ make python3.11 -y +ENV NODE_GYP_FORCE_PYTHON=/usr/bin/python3.11 + +# Install latest NPM and Yarn +RUN npm install -g npm@latest +RUN npm install -g yarn@latest + +# install additional native dependencies build tools +RUN apt install -y build-essential + +# install Git client +RUN apt-get install -y git +# install unzip utility to speed up Cypress unzips +# https://github.com/cypress-io/cypress/releases/tag/v3.8.0 +RUN apt-get install -y unzip + +# avoid any prompts +ENV DEBIAN_FRONTEND noninteractive +# install tzdata package +RUN apt-get install -y tzdata +# set your timezone +RUN ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime +RUN dpkg-reconfigure --frontend noninteractive tzdata + +# install Cypress dependencies (separate commands to avoid time outs) +RUN apt-get install -y \ + libatk1.0-0 \ + libgtk2.0-0t64 \ + libglib2.0-0 \ + libatk-bridge2.0-0 \ + libcups2 \ + libgtk-3-0t64 \ + libgbm1 \ + libgbm-dev +RUN apt-get install -y \ + libnotify-dev +RUN apt-get install -y \ + libnss3 \ + libxss1 +RUN apt-get install -y \ + libasound2t64 \ + libxtst6 \ + xauth \ + xvfb + +# a few environment variables to make NPM installs easier +# good colors for most applications +ENV TERM xterm +# avoid million NPM install messages +ENV npm_config_loglevel warn +# allow installing when the main user is root +ENV npm_config_unsafe_perm true + +# versions of local tools +RUN echo " node version: $(node -v) \n" \ + "npm version: $(npm -v) \n" \ + "yarn version: $(yarn -v) \n" \ + "debian version: $(cat /etc/debian_version) \n" \ + "user: $(whoami) \n" \ + "git: $(git --version) \n" + +RUN echo "More version info" +RUN cat /etc/lsb-release +RUN cat /etc/os-release \ No newline at end of file diff --git a/base-internal/releases/ubuntu/ubuntu24-node22/README.md b/base-internal/releases/ubuntu/ubuntu24-node22/README.md new file mode 100644 index 0000000000..b4ab382826 --- /dev/null +++ b/base-internal/releases/ubuntu/ubuntu24-node22/README.md @@ -0,0 +1,23 @@ +# Ubuntu 24.04 with Node.js 22.15.1 + +This is a base image for Cypress that includes: + +- Ubuntu 24.04 +- Node.js 22.15.1 +- Latest NPM +- Latest Yarn +- Git +- Python 3.11 (for node-gyp) +- All Cypress dependencies + +## Usage + +```bash +docker pull cypress/base-internal:ubuntu24-node22 +``` + +## Build + +```bash +./build.sh +``` diff --git a/browsers-internal/README.md b/browsers-internal/README.md index 682aff23ae..53b9ed41df 100644 --- a/browsers-internal/README.md +++ b/browsers-internal/README.md @@ -5,6 +5,11 @@ > `cypress/browsers-internal` Docker images are intended for internal Cypress.io use only. Please see [cypress/browsers](../browsers) for public images. + +> [!NOTE] +> `cypress/browsers-internal` Docker images are *no longer used*. Do not create new ones. + + Images are generally built from [cypress/base-internal](../base-internal/) images. For content details of each image, see the corresponding [releases](./releases/) sub-directory. ## Tags