Skip to content

Commit 3915a48

Browse files
authored
chore: add ubuntu22 and 24 node 20 images (#1333)
1 parent 578ac76 commit 3915a48

File tree

6 files changed

+203
-0
lines changed

6 files changed

+203
-0
lines changed
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
FROM ubuntu:22.04
2+
3+
RUN apt-get update && \
4+
apt-get install -y apt-transport-https ca-certificates curl gnupg
5+
RUN mkdir -p /etc/apt/keyrings
6+
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
7+
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
8+
RUN apt-get update && apt-get install -y nodejs
9+
10+
# Install latest NPM and Yarn
11+
RUN npm install -g npm@latest
12+
RUN npm install -g yarn@latest
13+
14+
# install additional native dependencies build tools
15+
RUN apt install -y build-essential
16+
17+
# install Git client
18+
RUN apt-get install -y git
19+
# install unzip utility to speed up Cypress unzips
20+
# https://github.com/cypress-io/cypress/releases/tag/v3.8.0
21+
RUN apt-get install -y unzip
22+
23+
# avoid any prompts
24+
ENV DEBIAN_FRONTEND noninteractive
25+
# install tzdata package
26+
RUN apt-get install -y tzdata
27+
# set your timezone
28+
RUN ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime
29+
RUN dpkg-reconfigure --frontend noninteractive tzdata
30+
31+
# install Cypress dependencies (separate commands to avoid time outs)
32+
RUN apt-get install -y \
33+
libatk1.0-0 \
34+
libgtk2.0-0 \
35+
libglib2.0-0 \
36+
libatk-bridge2.0-0 \
37+
libcups2 \
38+
libgtk-3-0 \
39+
libgbm1
40+
RUN apt-get install -y \
41+
libnotify-dev
42+
RUN apt-get install -y \
43+
libgconf-2-4 \
44+
libnss3 \
45+
libxss1
46+
RUN apt-get install -y \
47+
libasound2 \
48+
xvfb
49+
50+
# a few environment variables to make NPM installs easier
51+
# good colors for most applications
52+
ENV TERM xterm
53+
# avoid million NPM install messages
54+
ENV npm_config_loglevel warn
55+
# allow installing when the main user is root
56+
ENV npm_config_unsafe_perm true
57+
58+
# versions of local tools
59+
RUN echo " node version: $(node -v) \n" \
60+
"npm version: $(npm -v) \n" \
61+
"yarn version: $(yarn -v) \n" \
62+
"debian version: $(cat /etc/debian_version) \n" \
63+
"user: $(whoami) \n" \
64+
"git: $(git --version) \n"
65+
66+
RUN echo "More version info"
67+
RUN cat /etc/lsb-release
68+
RUN cat /etc/os-release
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# cypress/base-internal:ubuntu22-node20
2+
3+
Image with Ubuntu 22.04 and Node 20.x.x. To be used internally by Cypress.io and is not intended for public use.
4+
5+
```
6+
node version: v20.x.x
7+
npm version:
8+
yarn version:
9+
debian version:
10+
user: root
11+
git: git version 2.20.1
12+
DISTRIB_ID=Ubuntu
13+
DISTRIB_RELEASE=22.04.2
14+
DISTRIB_CODENAME=jammy
15+
DISTRIB_DESCRIPTION="Ubuntu 22.04"
16+
NAME="Ubuntu"
17+
VERSION="22.04 (Jammy Jellyfish)"
18+
ID=ubuntu
19+
ID_LIKE=debian
20+
PRETTY_NAME="Ubuntu 22.04"
21+
VERSION_ID="22.04"
22+
```
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
set e+x
2+
3+
# build image with Cypress dependencies
4+
LOCAL_NAME=cypress/base-internal:ubuntu22-node20
5+
6+
echo "Building $LOCAL_NAME"
7+
docker build -t $LOCAL_NAME --platform linux/amd64 .
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
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
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# cypress/base-internal:ubuntu24-node20
2+
3+
Image with Ubuntu 24.04 and Node 20.x.x. To be used internally by Cypress.io and is not intended for public use.
4+
5+
```
6+
node version: v20.x.x
7+
npm version:
8+
yarn version:
9+
debian version:
10+
user: root
11+
git: git version 2.20.1
12+
DISTRIB_ID=Ubuntu
13+
DISTRIB_RELEASE=24.04
14+
DISTRIB_CODENAME=noble
15+
DISTRIB_DESCRIPTION="Ubuntu 24.04"
16+
NAME="Ubuntu"
17+
VERSION="24.04 (Noble Numbat)"
18+
ID=ubuntu
19+
ID_LIKE=debian
20+
PRETTY_NAME="Ubuntu 24.04"
21+
VERSION_ID="24.04"
22+
```
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
set e+x
2+
3+
# build image with Cypress dependencies
4+
LOCAL_NAME=cypress/base-internal:ubuntu24-node20
5+
6+
echo "Building $LOCAL_NAME"
7+
docker build -t $LOCAL_NAME --platform linux/amd64 .

0 commit comments

Comments
 (0)