-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile_cypress
87 lines (79 loc) · 1.98 KB
/
Dockerfile_cypress
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
FROM cypress/base:16.13.2
# Instlal Google Chrome and all its deps
# https://www.cloudsavvyit.com/13461/how-to-run-puppeteer-and-headless-chrome-in-a-docker-container/
# This is required to run screenshots tests (Puppeteer).
# We are not entirely sure how many of these dependencies puppeteer actually uses.
RUN apt-get update && apt-get install -y \
fonts-liberation \
gconf-service \
libappindicator1 \
libasound2 \
libatk1.0-0 \
libcairo2 \
libcups2 \
libfontconfig1 \
libgbm-dev \
libgdk-pixbuf2.0-0 \
libgtk-3-0 \
libicu-dev \
libjpeg-dev \
libnspr4 \
libnss3 \
libpango-1.0-0 \
libpangocairo-1.0-0 \
libpng-dev \
libx11-6 \
libx11-xcb1 \
libxcb1 \
libxcomposite1 \
libxcursor1 \
libxdamage1 \
libxext6 \
libxfixes3 \
libxi6 \
libxrandr2 \
libxrender1 \
libxss1 \
libxtst6 \
xdg-utils \
fonts-liberation \
libasound2 \
libatk-bridge2.0-0 \
libatk1.0-0 \
libatspi2.0-0 \
libcups2 \
libdbus-1-3 \
libdrm2 \
libgbm1 \
libgtk-3-0 \
libnspr4 \
libnss3 \
libxcomposite1 \
libxdamage1 \
libxfixes3 \
libxkbcommon0 \
libxrandr2 \
xdg-utils \
libu2f-udev \
libvulkan1
RUN wget --no-verbose -O /tmp/chrome.deb https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_102.0.5005.115-1_amd64.deb \
&& apt install -y /tmp/chrome.deb \
&& rm -rf /tmp/chrome.deb
RUN apt-get install -y -f \
&& rm -rf /var/lib/apt/lists/*
#==============
# VNC and Xvfb
#==============
RUN apt-get update -y \
&& apt-get -y install \
xvfb \
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/*
# prepare directory structure
WORKDIR /usr/src/app
RUN mkdir ./cypress
COPY cypress.config.js .
COPY package.json .
COPY ./cypress ./cypress
RUN npm install -g yarn
RUN npx [email protected] install
RUN yarn