-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.executor
More file actions
69 lines (58 loc) · 1.78 KB
/
Copy pathDockerfile.executor
File metadata and controls
69 lines (58 loc) · 1.78 KB
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
# Docker Executor Dockerfile
FROM python:3.11-slim
# Install system dependencies for Playwright and Node.js
RUN apt-get update && apt-get install -y \
libglib2.0-0 \
libnss3 \
libnspr4 \
libatk1.0-0 \
libatk-bridge2.0-0 \
libcups2 \
libdrm2 \
libdbus-1-3 \
libxcb1 \
libxkbcommon0 \
libx11-6 \
libxcomposite1 \
libxdamage1 \
libxext6 \
libxfixes3 \
libxrandr2 \
libgbm1 \
libpango-1.0-0 \
libcairo2 \
libasound2 \
libgl1 \
curl \
gnupg \
ffmpeg \
android-sdk-platform-tools-common \
adb \
default-jre-headless \
&& rm -rf /var/lib/apt/lists/*
# Install Allure CLI
RUN curl -o allure-2.29.0.tgz -L https://github.com/allure-framework/allure2/releases/download/2.29.0/allure-2.29.0.tgz \
&& tar -zxvf allure-2.29.0.tgz -C /opt/ \
&& ln -s /opt/allure-2.29.0/bin/allure /usr/bin/allure \
&& rm allure-2.29.0.tgz
# Install Node.js
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get install -y nodejs \
&& rm -rf /var/lib/apt/lists/*
# Install agent-browser CLI
RUN npm install -g agent-browser
# Install agent-mobile CLI from private repo
RUN pip install agent-mobile --index-url https://git14.qa.fortinet-us.com/api/v4/projects/248/packages/pypi/simple
WORKDIR /app
# Ensure we have the same environment as the host
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
RUN playwright install chromium
# Copy the tools and make sure they are accessible
COPY app /app/app
# Set PYTHONPATH to allow importing from the root
ENV PYTHONPATH=/app
# Ignore HTTPS certificate errors for automation (corporate proxies, self-signed certs)
ENV AGENT_BROWSER_IGNORE_HTTPS_ERRORS=true
# Default command: Stay alive
CMD ["tail", "-f", "/dev/null"]