-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdockerfile
67 lines (52 loc) · 2.1 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
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
from python:3.7.7
RUN git clone https://github.com/bendangnuksung/bota.git
# Apt setup
RUN apt-get update && \
pip install --upgrade pip && \
apt install -y libgl1-mesa-glx && \
apt-get install -y screen
RUN git clone https://github.com/joshuaduffy/dota2api.git && \
cd dota2api && \
python setup.py install && \
cd ../ && \
rm -rf dota2api
## webscreenshot
RUN apt-get install -y xvfb && \
apt-get install -y phantomjs
## firefox
RUN apt-get install -y software-properties-common
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A6DCF7707EBC211F
RUN apt-add-repository "deb http://ppa.launchpad.net/ubuntu-mozilla-security/ppa/ubuntu bionic main"
RUN apt-get update && \
apt-get install -y firefox
# Gecko Driver
ENV GECKODRIVER_VERSION 0.29.1
RUN wget --no-verbose -O /tmp/geckodriver.tar.gz https://github.com/mozilla/geckodriver/releases/download/v$GECKODRIVER_VERSION/geckodriver-v$GECKODRIVER_VERSION-linux64.tar.gz \
&& rm -rf /opt/geckodriver \
&& tar -C /opt -zxf /tmp/geckodriver.tar.gz \
&& rm /tmp/geckodriver.tar.gz \
&& mv /opt/geckodriver /opt/geckodriver-$GECKODRIVER_VERSION \
&& chmod 755 /opt/geckodriver-$GECKODRIVER_VERSION \
&& ln -fs /opt/geckodriver-$GECKODRIVER_VERSION /usr/bin/geckodriver \
&& ln -fs /opt/geckodriver-$GECKODRIVER_VERSION /usr/bin/wires
# install chromium
RUN apt-get install -y chromium && \
curl -LO https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \
apt-get install -y ./google-chrome-stable_current_amd64.deb && \
rm google-chrome-stable_current_amd64.deb
ENTRYPOINT ./bota/run_bota_docker.sh
RUN cd bota/ && \
git pull
RUN pip install -r bota/requirements.txt
# make Directories
RUN mkdir -p bota/bota/data/steam_user
RUN mkdir -p bota/bota/data/counter_heroes
RUN mkdir -p bota/bota/data/good_against_heroes
RUN mkdir -p bota/bota/data/guide_build
RUN mkdir -p bota/bota/data/items_build
# run scrap during building
RUN cd bota/ && \
export PYTHONPATH=$PYTHONPATH:$pwd && \
sh run_scrap.sh 3
# sudo docker build --network host -f dockerfile -t DOCKERNAME:TAGNAME .
#