mitchellkrogza / nginx-ultimate-bad-bot-blocker

Nginx Block Bad Bots, Spam Referrer Blocker, Vulnerability Scanners, User-Agents, Malware, Adware, Ransomware, Malicious Sites, with anti-DDOS, Wordpress Theme Detector Blocking and Fail2Ban Jail for Repeat Offenders
Other
3.81k stars 472 forks source link

[INSTALLATION] Issue on installing on Docker File #503

Open killmasta93 opened 1 year ago

killmasta93 commented 1 year ago

Hi I was wondering if someone else has had this issue before Currently trying to to install on a docker environment using SWAG This is my docker file

FROM lscr.io/linuxserver/swag:latest
RUN apk add --upgrade nginx-mod-http-naxsi
RUN apk add vim
RUN apk add --no-cache python2
ADD ./nxutil/ /opt/nxutil/
RUN cd /opt/nxutil/ && python setup.py install
RUN apk add curl wget

# https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/blob/master/MANUAL-CONFIGURATION.md
RUN wget https://raw.githubusercontent.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/master/conf.d/globalblacklist.conf -O /config/nginx/globalblacklist.conf
RUN mkdir /config/nginx/bots.d
RUN wget https://raw.githubusercontent.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/master/bots.d/blockbots.conf -O /config/nginx/bots.d/blockbots.conf
RUN wget https://raw.githubusercontent.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/master/bots.d/ddos.conf -O /config/nginx/bots.d/ddos.conf
RUN wget https://raw.githubusercontent.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/master/bots.d/whitelist-ips.conf -O /config/nginx/bots.d/whitelist-ips.conf
RUN wget https://raw.githubusercontent.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/master/bots.d/whitelist-domains.conf -O /config/nginx/bots.d/whitelist-domains.conf
RUN wget https://raw.githubusercontent.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/master/bots.d/blacklist-user-agents.conf -O /config/nginx/bots.d/blacklist-user-agents.conf
RUN wget https://raw.githubusercontent.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/master/bots.d/custom-bad-referrers.conf -O /config/nginx/bots.d/custom-bad-referrers.conf
RUN wget https://raw.githubusercontent.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/master/bots.d/blacklist-ips.conf -O /config/nginx/bots.d/blacklist-ips.conf
RUN wget https://raw.githubusercontent.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/master/bots.d/bad-referrer-words.conf -O /config/nginx/bots.d/bad-referrer-words.conf
RUN wget https://raw.githubusercontent.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/master/conf.d/botblocker-nginx-settings.conf -O /config/nginx/botblocker-nginx-settings.conf

# copy nginx blocker update script into daily cron
COPY update_blocker.sh /etc/periodic/daily/update_blocker

# make sure script is executable
RUN chmod a+x /etc/periodic/daily/update_blocker

# start crond to update blocker
RUN crond -b

but i keep getting this error not sure why in the container it has that route


root@a3aedac24f33:/# ls /config/nginx/
authelia-location.conf  dhparams.pem  maxmind.conf  proxy-confs  resolver.conf  ssl.conf
authelia-server.conf    ldap.conf     nginx.conf    proxy.conf   site-confs     worker_processes.conf
root@a3aedac24f33:/# 
 => ERROR [ 8/21] RUN wget https://raw.githubusercontent.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/master/conf.d/globalblacklist.conf -O /config/nginx/globalblacklist.conf                                                            1.0s
------                                                                                                                                                                                                                                              
 > [ 8/21] RUN wget https://raw.githubusercontent.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/master/conf.d/globalblacklist.conf -O /config/nginx/globalblacklist.conf:
#0 0.700 /config/nginx/globalblacklist.conf: No such file or directory
------
failed to solve: executor failed running [/bin/sh -c wget https://raw.githubusercontent.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/master/conf.d/globalblacklist.conf -O /config/nginx/globalblacklist.conf]: exit code: 1

Thank you