forked from GSA/srt-fbo-scraper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-Test
82 lines (72 loc) · 2.22 KB
/
Dockerfile-Test
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
70
71
72
73
74
75
76
77
78
79
80
81
82
FROM python:3.6.6
ENV SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.6/supercronic-linux-amd64 \
SUPERCRONIC=supercronic-linux-amd64 \
SUPERCRONIC_SHA1SUM=c3b78d342e5413ad39092fd3cfc083a85f5e2b75 \
TEST_DB_URL=postgresql+psycopg2://circleci:[email protected]/srt
RUN apt-get update && apt-get install -y \
antiword \
build-essential \
ca-certificates \
curl \
flac \
ffmpeg \
gcc \
git \
gzip \
lame \
libav-tools \
libjpeg-dev \
libmad0 \
libpq-dev \
libpulse-dev \
libsox-fmt-mp3 \
libxml2-dev \
libxslt1-dev \
make \
musl-dev \
netcat \
poppler-utils \
postgresql-common \
pstotext \
python-dev \
python-pip \
sox \
ssh \
swig \
tar \
tesseract-ocr \
unrtf \
zlib1g-dev \
unzip \
curl \
vim \
inotify-tools \
&& curl -fsSLO "$SUPERCRONIC_URL" \
&& echo "${SUPERCRONIC_SHA1SUM} ${SUPERCRONIC}" | sha1sum -c - \
&& chmod +x "$SUPERCRONIC" \
&& mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \
&& ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic \
#clean up the apt cache
&& rm -rf /var/lib/apt/lists/*
ADD requirements-test.txt .
RUN pip install -r requirements-test.txt
WORKDIR /opt
CMD ["/bin/sh"]
COPY geckodriver .
RUN cp geckodriver /usr/local/bin
WORKDIR /opt
ADD requirements-test.txt .
RUN pip install -r requirements-test.txt
# Adding trusting keys to apt for repositories
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
# Adding Google Chrome to the repositories
RUN sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
# Updating apt to see and install Google Chrome
RUN apt-get -y update
# Magic happens
RUN apt-get install -y google-chrome-stable
# Download the Chrome Driver
RUN wget -O /tmp/chromedriver.zip http://chromedriver.storage.googleapis.com/`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE`/chromedriver_linux64.zip
# Unzip the Chrome Driver into /usr/local/bin directory
RUN unzip /tmp/chromedriver.zip chromedriver -d /usr/local/bin/
ENV DISPLAY=192.168.56.1:0.0