-
Notifications
You must be signed in to change notification settings - Fork 9
/
Dockerfile
41 lines (33 loc) · 935 Bytes
/
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
FROM zenika/alpine-chrome
USER root
RUN apk add git
RUN apk add --update make
RUN apk add --update g++
RUN apk add --update vim
RUN apk add --update bash
RUN mkdir -p /archive
RUN mkdir -p /jobs
EXPOSE 9222
# install squidwarc while we have access to python 2.7
RUN git clone https://github.com/N0taN3rd/Squidwarc.git
WORKDIR Squidwarc
RUN npm install
# switch to python 3
RUN apk del python
RUN apk add --no-cache python3 && \
python3 -m ensurepip && \
rm -r /usr/lib/python*/ensurepip && \
pip3 install --upgrade pip setuptools && \
ln -sf /usr/bin/python3 /usr/bin/python && \
rm -r /root/.cache
WORKDIR /usr/src/app
COPY ./requirements.txt requirements.txt
RUN pip install -r requirements.txt
COPY ./worker.sh worker.sh
COPY ./worker.py worker.py
COPY ./test_worker.py test_worker.py
COPY ./testjob_fb.json testjob_fb.json
RUN chmod +x worker.sh
USER chrome
ENTRYPOINT []
CMD ["/usr/src/app/worker.sh"]