| skipped 10 lines |
11 | 11 | | |
12 | 12 | | ######## local build & run: |
13 | 13 | | # docker build -t hiphp:latest . |
| 14 | + | # Run as CLI: |
14 | 15 | | # docker run -e KEY="<KEY>" -e URL="<URL>" -i -t hiphp:latest |
| 16 | + | # Run as GUI: |
| 17 | + | # docker run -e DST="True" --rm -p 127.0.0.1:8080:8080 -i -t hiphp:latest |
15 | 18 | | |
16 | 19 | | ######## docker.io pull, build & run: |
17 | 20 | | # docker pull docker.io/yasserbdj96/hiphp:latest |
18 | 21 | | # docker build -t docker.io/yasserbdj96/hiphp:latest . |
| 22 | + | # Run as CLI: |
19 | 23 | | # docker run -e KEY="<KEY>" -e URL="<URL>" -i -t docker.io/yasserbdj96/hiphp:latest |
| 24 | + | # Run as GUI: |
| 25 | + | # docker run -e DST="True" --rm -p 127.0.0.1:8080:8080 -i -t docker.io/yasserbdj96/hiphp:latest |
20 | 26 | | |
21 | 27 | | ######## ghcr.io pull, build & run: |
22 | 28 | | # docker pull ghcr.io/yasserbdj96/hiphp:latest |
23 | 29 | | # docker build -t ghcr.io/yasserbdj96/hiphp:latest . |
| 30 | + | # Run as CLI: |
24 | 31 | | # docker run -e KEY="<KEY>" -e URL="<URL>" -i -t ghcr.io/yasserbdj96/hiphp:latest |
25 | | - | |
| 32 | + | # Run as GUI: |
| 33 | + | # docker run -e DST="True" --rm -p 127.0.0.1:8080:8080 -i -t ghcr.io/yasserbdj96/hiphp:latest |
26 | 34 | | |
27 | 35 | | #START{ |
28 | 36 | | FROM python:3.10 |
29 | 37 | | |
| 38 | + | |
| 39 | + | # start install google-chrome: |
| 40 | + | # Adding trusting keys to apt for repositories |
| 41 | + | RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - |
| 42 | + | |
| 43 | + | # Adding Google Chrome to the repositories |
| 44 | + | RUN sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' |
| 45 | + | |
| 46 | + | # Updating apt to see and install Google Chrome |
| 47 | + | RUN apt-get -y update |
| 48 | + | |
| 49 | + | # Magic happens |
| 50 | + | RUN apt-get install -y google-chrome-stable |
| 51 | + | |
| 52 | + | # Installing Unzip |
| 53 | + | RUN apt-get install -yqq unzip |
| 54 | + | |
| 55 | + | # Download the Chrome Driver |
| 56 | + | RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - |
| 57 | + | RUN sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' |
| 58 | + | RUN apt-get -y update |
| 59 | + | RUN apt-get install -y google-chrome-stable |
| 60 | + | |
| 61 | + | # install chromedriver |
| 62 | + | RUN apt-get install -yqq unzip |
| 63 | + | RUN wget -O /tmp/chromedriver.zip http://chromedriver.storage.googleapis.com/`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE`/chromedriver_linux64.zip |
| 64 | + | RUN unzip /tmp/chromedriver.zip chromedriver -d /usr/local/bin/ |
| 65 | + | # end install google-chrome. |
| 66 | + | |
30 | 67 | | WORKDIR /wrdir |
31 | 68 | | |
32 | 69 | | COPY ./run.py /wrdir |
33 | 70 | | COPY ./hiphp /wrdir/hiphp |
| 71 | + | COPY ./tools/hiphp_desktop /wrdir |
34 | 72 | | COPY ./requirements.txt /wrdir/requirements.txt |
| 73 | + | COPY ./tools/hiphp_desktop/requirements.txt /wrdir/requirements-dst.txt |
35 | 74 | | #COPY ./config_file.json /wrdir/config_file.json |
36 | 75 | | |
37 | 76 | | RUN pip install --no-cache-dir --upgrade pip |
38 | 77 | | RUN pip install --no-cache-dir --upgrade -r /wrdir/requirements.txt |
| 78 | + | RUN pip install --no-cache-dir --upgrade -r /wrdir/requirements-dst.txt |
| 79 | + | |
| 80 | + | EXPOSE 8080 |
39 | 81 | | |
40 | 82 | | CMD ["python", "run.py"] |
41 | 83 | | #}END. |