-
Notifications
You must be signed in to change notification settings - Fork 158
/
Copy pathDockerfile
31 lines (25 loc) · 878 Bytes
/
Dockerfile
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
# Build with:
# docker build -t cypress-tests .
#
# Run with:
# docker run --shm-size=256m cypress-tests
#
# Or, build and run with:
# docker build -t cypress-tests . && docker run --shm-size=256m cypress-tests
#
# To generate new snapshots, run:
# docker run -v `pwd`/test/cypress/snapshots:/cypress/test/cypress/snapshots -e "CYPRESS_updateSnapshots=true" --shm-size=256m cypress-tests
# This uses the Cypress image with Chrome support
# We need Chrome as Electron doesn't support WebGL
FROM cypress/browsers:node12.6.0-chrome77
# Define the working directory
WORKDIR /cypress
# Copy everything needed for installation
COPY package.json yarn.lock ./
# Install cypress
RUN yarn
# Copy over the source, tests, etc
# The ".dockerignore" prevents the user's `node_modules/*` from being copied
COPY . .
# Run the CI version of cypress
CMD ["yarn", "test-ci:cypress"]