|
| 1 | +FROM ubuntu:24.04 |
| 2 | + |
| 3 | +# set up NodeJS |
| 4 | +RUN apt-get update && \ |
| 5 | + apt-get install -y apt-transport-https ca-certificates curl gnupg |
| 6 | +RUN mkdir -p /etc/apt/keyrings |
| 7 | +RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg |
| 8 | +RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list |
| 9 | +RUN apt-get update && apt-get install -y nodejs |
| 10 | + |
| 11 | +# set up Python 3.11 |
| 12 | +RUN apt-get install software-properties-common -y |
| 13 | +RUN add-apt-repository ppa:deadsnakes/ppa |
| 14 | +RUN apt-get update && apt-get upgrade -y |
| 15 | +RUN apt-get install g++ make python3.11 -y |
| 16 | +ENV NODE_GYP_FORCE_PYTHON=/usr/bin/python3.11 |
| 17 | + |
| 18 | +# Install latest NPM and Yarn |
| 19 | +RUN npm install -g npm@latest |
| 20 | +RUN npm install -g yarn@latest |
| 21 | + |
| 22 | +# install additional native dependencies build tools |
| 23 | +RUN apt install -y build-essential |
| 24 | + |
| 25 | +# install Git client |
| 26 | +RUN apt-get install -y git |
| 27 | +# install unzip utility to speed up Cypress unzips |
| 28 | +# https://github.com/cypress-io/cypress/releases/tag/v3.8.0 |
| 29 | +RUN apt-get install -y unzip |
| 30 | + |
| 31 | +# avoid any prompts |
| 32 | +ENV DEBIAN_FRONTEND noninteractive |
| 33 | +# install tzdata package |
| 34 | +RUN apt-get install -y tzdata |
| 35 | +# set your timezone |
| 36 | +RUN ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime |
| 37 | +RUN dpkg-reconfigure --frontend noninteractive tzdata |
| 38 | + |
| 39 | +# install Cypress dependencies (separate commands to avoid time outs) |
| 40 | +RUN apt-get install -y \ |
| 41 | + libatk1.0-0 \ |
| 42 | + libgtk2.0-0t64 \ |
| 43 | + libglib2.0-0 \ |
| 44 | + libatk-bridge2.0-0 \ |
| 45 | + libcups2 \ |
| 46 | + libgtk-3-0t64 \ |
| 47 | + libgbm1 \ |
| 48 | + libgbm-dev |
| 49 | +RUN apt-get install -y \ |
| 50 | + libnotify-dev |
| 51 | +RUN apt-get install -y \ |
| 52 | + libnss3 \ |
| 53 | + libxss1 |
| 54 | +RUN apt-get install -y \ |
| 55 | + libasound2t64 \ |
| 56 | + libxtst6 \ |
| 57 | + xauth \ |
| 58 | + xvfb |
| 59 | +# a few environment variables to make NPM installs easier |
| 60 | +# good colors for most applications |
| 61 | +ENV TERM xterm |
| 62 | +# avoid million NPM install messages |
| 63 | +ENV npm_config_loglevel warn |
| 64 | +# allow installing when the main user is root |
| 65 | +ENV npm_config_unsafe_perm true |
| 66 | + |
| 67 | +# versions of local tools |
| 68 | +RUN echo " node version: $(node -v) \n" \ |
| 69 | + "npm version: $(npm -v) \n" \ |
| 70 | + "yarn version: $(yarn -v) \n" \ |
| 71 | + "debian version: $(cat /etc/debian_version) \n" \ |
| 72 | + "user: $(whoami) \n" \ |
| 73 | + "git: $(git --version) \n" |
| 74 | + |
| 75 | +RUN echo "More version info" |
| 76 | +RUN cat /etc/lsb-release |
| 77 | +RUN cat /etc/os-release |
0 commit comments