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

wip #4

Open
wants to merge 1 commit into
base: codefresh-main
Choose a base branch
from
Open
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
67 changes: 67 additions & 0 deletions base/16.14.2/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# WARNING: this file was autogenerated by generate-base-image.js
# contains all dependencies for running Cypress.io Test Runner
# https://on.cypress.io/docker and https://on.cypress.io/ci
#
# build it with command
# docker build -t cypress/base:16.14.2 .
#
FROM node:16.14.2-buster

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 \
xauth \
xvfb \
# 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

RUN npm --version

RUN npm install -g yarn@latest --force
RUN yarn --version

# 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

# Node libraries
RUN node -p process.versions

# Show where Node loads required modules from
RUN node -p 'module.paths'

# 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"
19 changes: 19 additions & 0 deletions base/16.14.2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!-- WARNING: this file was autogenerated by generate-base-image.js -->

# cypress/base:16.14.2

A Docker image with all dependencies pre-installed.
Just add your NPM packages (including Cypress) and run the tests.
See [Cypress Docker docs](https://on.cypress.io/docker) and
[Cypress CI guide](https://on.cypress.io/ci).

## Example

Sample Dockerfile

```
FROM cypress/base:16.14.2
RUN npm install --save-dev cypress
RUN $(npm bin)/cypress verify
RUN $(npm bin)/cypress run
```
8 changes: 8 additions & 0 deletions base/16.14.2/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# WARNING: this file was autogenerated by generate-base-image.js
set e+x

# build image with Cypress dependencies
LOCAL_NAME=cypress/base:16.14.2

echo "Building $LOCAL_NAME"
docker build -t $LOCAL_NAME .
53 changes: 53 additions & 0 deletions browsers/node16.14.2-chrome91-ff89/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
FROM gcr.io/codefresh-inc/cypress/base:16.14.2

USER root

RUN node --version

# Chrome dependencies
RUN apt-get update
RUN apt-get install -y fonts-liberation libappindicator3-1 xdg-utils

# install Chrome browser
ENV CHROME_VERSION 91.0.4472.114
RUN wget -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_${CHROME_VERSION}-1_amd64.deb" && \
dpkg -i /usr/src/google-chrome-stable_current_amd64.deb ; \
apt-get install -f -y && \
rm -f /usr/src/google-chrome-stable_current_amd64.deb
RUN google-chrome --version

# "fake" dbus address to prevent errors
# https://github.com/SeleniumHQ/docker-selenium/issues/87
ENV DBUS_SESSION_BUS_ADDRESS=/dev/null

# Add zip utility - it comes in very handy
RUN apt-get update && apt-get install -y zip

# add codecs needed for video playback in firefox
# https://github.com/cypress-io/cypress-docker-images/issues/150
RUN apt-get install mplayer -y

# install Firefox browser
ARG FIREFOX_VERSION=89.0.2
RUN wget --no-verbose -O /tmp/firefox.tar.bz2 https://download-installer.cdn.mozilla.net/pub/firefox/releases/$FIREFOX_VERSION/linux-x86_64/en-US/firefox-$FIREFOX_VERSION.tar.bz2 \
&& tar -C /opt -xjf /tmp/firefox.tar.bz2 \
&& rm /tmp/firefox.tar.bz2 \
&& ln -fs /opt/firefox/firefox /usr/bin/firefox

# 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" \
"git version: $(git --version) \n" \
"whoami: $(whoami) \n"

# 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
20 changes: 20 additions & 0 deletions browsers/node16.14.2-chrome91-ff89/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# cypress/browsers:node16.14.2-chrome91-ff89

A complete image with all operating system dependencies for Cypress, Chrome
91 and Firefox 89 browsers.

[Dockerfile](Dockerfile)

```text
node version: v16.14.2
npm version: 6.14.13
yarn version: 1.22.10
debian version: 10.9
Chrome version: Google Chrome 91.0.4472.114
Firefox version: Mozilla Firefox 89.0.2
git version: git version 2.20.1
whoami: root
```

**Note:** this image uses the `root` user. You might want to switch to non-root
user like `node` when running this container for security.
6 changes: 6 additions & 0 deletions browsers/node16.14.2-chrome91-ff89/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
set e+x

LOCAL_NAME=cypress/browsers:node16.14.2-chrome91-ff89

echo "Building $LOCAL_NAME"
docker build --no-cache -t $LOCAL_NAME .
4 changes: 2 additions & 2 deletions included/8.7.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# WARNING: this file was autogenerated by generate-included-image.js
# using
# npm run add:included -- 8.7.0 cypress/browsers:node16.13.0-chrome91-ff89
# npm run add:included -- 8.7.0 cypress/browsers:node16.14.2-chrome91-ff89
#
# build this image with command
# docker build -t cypress/included:8.7.0 .
#
FROM gcr.io/codefresh-inc/cypress/browsers:node16.13.2-chrome91-ff89
FROM gcr.io/codefresh-inc/cypress/browsers:node16.14.2-chrome91-ff89

# Update the dependencies to get the latest and greatest (and safest!) packages.
RUN apt update && apt upgrade -y && apt-get install apt-transport-https ca-certificates gnupg lsb-release -y
Expand Down
2 changes: 1 addition & 1 deletion included/8.7.0/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!--
WARNING: this file was autogenerated by generate-included-image.js using

npm run add:included -- 8.7.0 cypress/browsers:node16.13.0-chrome91-ff89
npm run add:included -- 8.7.0 cypress/browsers:node16.14.2-chrome91-ff89
-->

# cypress/included:8.7.0
Expand Down
2 changes: 1 addition & 1 deletion included/8.7.0/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# WARNING: this file was autogenerated by generate-included-image.js
# using
# npm run add:included -- 8.7.0 cypress/browsers:node16.13.0-chrome91-ff89
# npm run add:included -- 8.7.0 cypress/browsers:node16.14.2-chrome91-ff89
set e+x

LOCAL_NAME=cypress/included:8.7.0
Expand Down