From a0a35e4e9592c9cb5f2bfa184241778b98736111 Mon Sep 17 00:00:00 2001 From: Kim Aharfi Date: Mon, 4 Apr 2022 12:54:52 +0300 Subject: [PATCH] wip --- base/16.14.2/Dockerfile | 67 +++++++++++++++++++ base/16.14.2/README.md | 19 ++++++ base/16.14.2/build.sh | 8 +++ browsers/node16.14.2-chrome91-ff89/Dockerfile | 53 +++++++++++++++ browsers/node16.14.2-chrome91-ff89/README.md | 20 ++++++ browsers/node16.14.2-chrome91-ff89/build.sh | 6 ++ included/8.7.0/Dockerfile | 4 +- included/8.7.0/README.md | 2 +- included/8.7.0/build.sh | 2 +- 9 files changed, 177 insertions(+), 4 deletions(-) create mode 100644 base/16.14.2/Dockerfile create mode 100644 base/16.14.2/README.md create mode 100755 base/16.14.2/build.sh create mode 100644 browsers/node16.14.2-chrome91-ff89/Dockerfile create mode 100644 browsers/node16.14.2-chrome91-ff89/README.md create mode 100755 browsers/node16.14.2-chrome91-ff89/build.sh diff --git a/base/16.14.2/Dockerfile b/base/16.14.2/Dockerfile new file mode 100644 index 0000000000..24bb8440d1 --- /dev/null +++ b/base/16.14.2/Dockerfile @@ -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" diff --git a/base/16.14.2/README.md b/base/16.14.2/README.md new file mode 100644 index 0000000000..54651441e6 --- /dev/null +++ b/base/16.14.2/README.md @@ -0,0 +1,19 @@ + + +# 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 +``` diff --git a/base/16.14.2/build.sh b/base/16.14.2/build.sh new file mode 100755 index 0000000000..deb812c889 --- /dev/null +++ b/base/16.14.2/build.sh @@ -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 . diff --git a/browsers/node16.14.2-chrome91-ff89/Dockerfile b/browsers/node16.14.2-chrome91-ff89/Dockerfile new file mode 100644 index 0000000000..083851361f --- /dev/null +++ b/browsers/node16.14.2-chrome91-ff89/Dockerfile @@ -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 diff --git a/browsers/node16.14.2-chrome91-ff89/README.md b/browsers/node16.14.2-chrome91-ff89/README.md new file mode 100644 index 0000000000..dad5395557 --- /dev/null +++ b/browsers/node16.14.2-chrome91-ff89/README.md @@ -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. diff --git a/browsers/node16.14.2-chrome91-ff89/build.sh b/browsers/node16.14.2-chrome91-ff89/build.sh new file mode 100755 index 0000000000..5aafb6baa8 --- /dev/null +++ b/browsers/node16.14.2-chrome91-ff89/build.sh @@ -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 . diff --git a/included/8.7.0/Dockerfile b/included/8.7.0/Dockerfile index f827fcd578..df59580bc1 100644 --- a/included/8.7.0/Dockerfile +++ b/included/8.7.0/Dockerfile @@ -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 diff --git a/included/8.7.0/README.md b/included/8.7.0/README.md index 0aefe45b5e..d9c971c925 100644 --- a/included/8.7.0/README.md +++ b/included/8.7.0/README.md @@ -1,7 +1,7 @@ # cypress/included:8.7.0 diff --git a/included/8.7.0/build.sh b/included/8.7.0/build.sh index b49e485c43..e3d68c2b46 100755 --- a/included/8.7.0/build.sh +++ b/included/8.7.0/build.sh @@ -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