mirror of
https://github.com/bunkerity/bunkerized-nginx
synced 2023-12-13 21:30:18 +01:00
43 lines
1.1 KiB
Docker
43 lines
1.1 KiB
Docker
FROM python:3.11.3-alpine
|
|
|
|
# Install firefox and geckodriver
|
|
RUN apk add --no-cache --virtual .build-deps curl grep zip && \
|
|
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 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 /opt/tests_ui
|
|
|
|
COPY requirements.txt .
|
|
|
|
RUN pip install --no-cache -r requirements.txt
|
|
|
|
RUN touch test.txt && \
|
|
zip test.zip test.txt && \
|
|
rm test.txt
|
|
|
|
RUN echo '{ \
|
|
"id": "discord", \
|
|
"name": "Discord", \
|
|
"description": "Send alerts to a Discord channel (using webhooks).", \
|
|
"version": "0.1", \
|
|
"stream": "no", \
|
|
"settings": {} \
|
|
}' > plugin.json && \
|
|
zip discord.zip plugin.json && \
|
|
rm plugin.json
|
|
|
|
# Clean up
|
|
RUN apk del .build-deps && \
|
|
rm -rf /var/cache/apk/*
|
|
|
|
COPY main.py .
|
|
|
|
ENV PYTHONUNBUFFERED=1
|
|
|
|
CMD ["python3", "main.py"]
|