forked from razorpay/django-DefectDojo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.integration-tests
51 lines (42 loc) · 1.21 KB
/
Dockerfile.integration-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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# code: language=Dockerfile
FROM python:3.8.11-slim-buster@sha256:9b0d7419e2811710aacee87c40a2c94693e2b6810c3e7e466b8c7fc5bde4cd66 as build
WORKDIR /app
RUN \
apt-get -y update && \
apt-get -y install \
git \
wget \
curl \
unzip \
gpg \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists && \
true
# Installing Google Chrome browser
RUN \
curl -sS -o - https://dl.google.com/linux/linux_signing_key.pub | apt-key add && \
echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list && \
apt-get -y update && \
apt-get -y install \
google-chrome-stable \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists && \
true
RUN pip install --no-cache-dir selenium requests chromedriver-autoinstaller
COPY docker/wait-for-it.sh \
docker/entrypoint-integration-tests.sh \
/
COPY tests/ ./tests/
RUN chmod -R 0777 /app
# These 2 lines are needed for the chromium driver
RUN chmod -R ugo+w /usr/local/lib/python3.8/site-packages
RUN mkdir /.local
RUN chmod -R ugo+w /.local
USER 1001
ENV \
DD_ADMIN_USER=admin \
DD_ADMIN_PASSWORD='' \
DD_BASE_URL="http://localhost:8080/"
CMD ["/entrypoint-integration-tests.sh"]