forked from m0-foundation/ttg-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.tests
33 lines (23 loc) · 854 Bytes
/
Dockerfile.tests
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
# Use Cypress base image with pre-installed headless browsers
FROM cypress/included:13.13.0
LABEL container.name="ttg-tests"
LABEL maintainer="m0labs"
LABEL description="a docker container which executes cypress e2e tests"
ENV TEST_RUN="01"
# Set working directory
WORKDIR /app
# Install Python, required by node-gyp
RUN apt-get update \
&& apt-get install -y python3 python3-pip \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
COPY cypress/docker/* /app/
# Install pm2 to run the app in the background
RUN npm install -g pm2
# Copy the application into the container
COPY package.json yarn.lock /app/
# Install any dependencies your application requires (if needed)
RUN yarn install && yarn cache clean
COPY . /app
# Run entry point script (start yarn dev server with pm2 and then run tests)
ENTRYPOINT ["/app/entrypoint.sh"]