forked from Sage/carbon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-cypress
56 lines (45 loc) · 1.21 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
FROM cypress/included:4.4.0
ENV APP_HOME /usr/src/app
RUN mkdir -p $APP_HOME
WORKDIR $APP_HOME
# install packages
RUN apt-get update && \
apt-get install -y curl \
wget \
default-jre \
libgtk2.0-0 \
libgtk-3-0 \
libnotify-dev \
libgconf-2-4 \
libnss3 \
libxss1 \
libasound2 \
libxtst6 \
xauth \
xvfb
ENV JAVA_HOME=/usr/lib/jvm/default-java
EXPOSE 9001
# Override default entrypoint from cypress/included
ENTRYPOINT []
# avoid many lines of progress bars during install
# https://github.com/cypress-io/cypress/issues/1243
ENV CI=1
# disable shared memory X11 affecting Cypress v4 and Chrome
# https://github.com/cypress-io/cypress-docker-images/issues/270
ENV QT_X11_NO_MITSHM=1
ENV _X11_NO_MITSHM=1
ENV _MITSHM=0
# point Cypress at the /root/cache no matter what user account is used
# see https://on.cypress.io/caching
ENV CYPRESS_CACHE_FOLDER=/root/.cache/Cypress
RUN npm install -g wait-on --silent
COPY package.json $APP_HOME
COPY package-lock.json $APP_HOME
RUN npm ci --silent
RUN $(npm bin)/cypress verify
# Cypress cache and installed version
# should be in the root user's home folder
RUN cypress cache path
RUN cypress cache list
RUN cypress info
COPY . $APP_HOME