-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
39 lines (32 loc) · 1.61 KB
/
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
32
33
34
35
36
37
38
39
# This dockerfile allows to run an crawl inside a docker container
# Pull base image.
#FROM debian:stable-slim
#FROM python:3
FROM ubuntu:20.10
# Install required packages.
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get --assume-yes --yes install sudo build-essential autoconf git zip unzip xz-utils
RUN DEBIAN_FRONTEND=noninteractive apt-get --assume-yes --yes install libtool libevent-dev libssl-dev
RUN DEBIAN_FRONTEND=noninteractive apt-get --assume-yes --yes install python3 python3-dev python3-setuptools python3-pip
RUN DEBIAN_FRONTEND=noninteractive apt-get --assume-yes --yes install net-tools ethtool tshark libpcap-dev iw tcpdump
RUN DEBIAN_FRONTEND=noninteractive apt-get --assume-yes --yes install xvfb firefox
RUN DEBIAN_FRONTEND=noninteractive apt-get --assume-yes --yes install netcat
RUN DEBIAN_FRONTEND=noninteractive apt-get --assume-yes --yes install sshpass
RUN DEBIAN_FRONTEND=noninteractive apt-get --assume-yes --yes install iproute2
RUN apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Install python requirements.
RUN pip install --upgrade pip
COPY requirements.txt /tmp/requirements.txt
RUN pip install -r /tmp/requirements.txt
# add host user to container
RUN adduser --system --group --disabled-password --gecos '' --shell /bin/bash docker
# download geckodriver
ADD https://github.com/mozilla/geckodriver/releases/download/v0.29.0/geckodriver-v0.29.0-linux64.tar.gz /bin/
RUN tar -zxvf /bin/geckodriver* -C /bin/
ENV PATH /bin/geckodriver:$PATH
# add setup.py
COPY setup.py /home/docker/tbb_setup/setup.py
RUN python3 /home/docker/tbb_setup/setup.py 10.0.10
# Set the display
ENV DISPLAY $DISPLAY