Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from cypress-io:master #74

Merged
merged 2 commits into from
Feb 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions base-internal/18.16.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# build it with command
# docker build -t cypress/base-internal:18.16.0 --platform linux/amd64 .
#
FROM node:18.16.0-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

# 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

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"
23 changes: 23 additions & 0 deletions base-internal/18.16.0/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# cypress/base-internal:18.16.0

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

## Example

Sample Dockerfile

```
FROM cypress/base-internal:18.16.0
RUN npm install --save-dev cypress
RUN $(npm bin)/cypress verify
RUN $(npm bin)/cypress run
```
7 changes: 7 additions & 0 deletions base-internal/18.16.0/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
set e+x

# build image with Cypress dependencies
LOCAL_NAME=cypress/base-internal:18.16.0

echo "Building $LOCAL_NAME"
docker build -t $LOCAL_NAME .
58 changes: 58 additions & 0 deletions base-internal/18.17.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# build it with command
# docker build -t cypress/base-internal:18.17.0 --platform linux/amd64 .
#
FROM node:18.17.0-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

# 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

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"
23 changes: 23 additions & 0 deletions base-internal/18.17.0/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# cypress/base-internal:18.17.0

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

## Example

Sample Dockerfile

```
FROM cypress/base-internal:18.17.0
RUN npm install --save-dev cypress
RUN $(npm bin)/cypress verify
RUN $(npm bin)/cypress run
```
7 changes: 7 additions & 0 deletions base-internal/18.17.0/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
set e+x

# build image with Cypress dependencies
LOCAL_NAME=cypress/base-internal:18.17.0

echo "Building $LOCAL_NAME"
docker build -t $LOCAL_NAME .
58 changes: 58 additions & 0 deletions base-internal/18.17.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# build it with command
# docker build -t cypress/base-internal:18.17.1 --platform linux/amd64 .
#
FROM node:18.17.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

# 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

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"
23 changes: 23 additions & 0 deletions base-internal/18.17.1/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# cypress/base-internal:18.17.1

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

## Example

Sample Dockerfile

```
FROM cypress/base-internal:18.17.1
RUN npm install --save-dev cypress
RUN $(npm bin)/cypress verify
RUN $(npm bin)/cypress run
```
7 changes: 7 additions & 0 deletions base-internal/18.17.1/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
set e+x

# build image with Cypress dependencies
LOCAL_NAME=cypress/base-internal:18.17.1

echo "Building $LOCAL_NAME"
docker build -t $LOCAL_NAME .
41 changes: 41 additions & 0 deletions browsers-internal/node18.16.0-chrome116-ff115-edge/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# build this image with command
# docker build -t cypress/browsers-internal:node18.16.0-chrome116-ff115-edge --platform linux/amd64 .
#
FROM cypress/browsers-internal:node18.16.0-chrome116-ff115

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)

# 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" \
"Chrome version: $(google-chrome --version) \n" \
"Firefox version: $(firefox --version) \n" \
"Edge version: n/a \n" \
"git version: $(git --version) \n" \
"whoami: $(whoami) \n"

18 changes: 18 additions & 0 deletions browsers-internal/node18.16.0-chrome116-ff115-edge/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# cypress/browsers-internal:node18.16.0-chrome116-ff115-edge

A complete image with all operating system dependencies for Cypress, and Chrome 116.0.5845.187-1, Firefox 115.0.1, 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/issues/695 for more information.
5 changes: 5 additions & 0 deletions browsers-internal/node18.16.0-chrome116-ff115-edge/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
set e+x

LOCAL_NAME=cypress/browsers-internal:node18.16.0-chrome116-ff115-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 at Cypress's issue tracker:"
echo " https://github.com/cypress-io/cypress-docker-images/issues/695"
printf "\e[0m" # reset
fi
Loading