mirror of
https://github.com/bunkerity/bunkerized-nginx
synced 2023-12-13 21:30:18 +01:00
27 lines
No EOL
841 B
Docker
27 lines
No EOL
841 B
Docker
FROM python:3.11.5-alpine
|
|
|
|
# Install firefox and geckodriver
|
|
RUN apk add --no-cache --virtual .build-deps curl grep zip wget && \
|
|
apk add --no-cache firefox
|
|
|
|
# Installing geckodriver for firefox...
|
|
RUN GECKODRIVER_VERSION=`curl -i https://github.com/mozilla/geckodriver/releases/latest | grep -Po 'v[0-9]+\.[0-9]+\.[0-9]+'` && \
|
|
wget -O geckodriver.tar.gz -w 5 https://github.com/mozilla/geckodriver/releases/download/$GECKODRIVER_VERSION/geckodriver-$GECKODRIVER_VERSION-linux64.tar.gz && \
|
|
tar -C /usr/local/bin -xzvf geckodriver.tar.gz && \
|
|
chmod +x /usr/local/bin/geckodriver && \
|
|
rm geckodriver.tar.gz
|
|
|
|
WORKDIR /tmp
|
|
|
|
COPY requirements.txt .
|
|
|
|
RUN MAKEFLAGS="-j $(nproc)" pip install --no-cache -r requirements.txt && \
|
|
rm -f requirements.txt
|
|
|
|
WORKDIR /opt/tests
|
|
|
|
COPY main.py .
|
|
|
|
EXPOSE 80
|
|
|
|
ENTRYPOINT [ "python3", "main.py" ] |