wargio / naxsi

NAXSI is an open-source, high performance, low rules maintenance WAF for NGINX

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question to use the repo in docker enviroment?

farzadha2 opened this issue · comments

Hi
I was wondering how i could use your repo in my docker file?

Currently i have this on my docker file which im using the old naxsi

FROM lscr.io/linuxserver/swag:latest
RUN apk update
RUN apk add --upgrade nginx-mod-http-naxsi

Thank you

i should probably write to the alpine distribution to ask them to diverge to use my repo.

the only thing you can do is create a Dockerfile and build the repo using their latest nginx

commented

Do you have any docs for how to do that, i.e. to use the pre-compiled package from Alpine's repo, and then compile / configure it for this NAXSI? Or does Nginx need to be compiled with NAXSI?

regarding alpine is kinda complicated (also why i haven't done it yet).
See more here: https://unix.stackexchange.com/questions/496755/how-to-get-the-source-code-used-to-build-the-packages-of-the-base-alpine-linux-d/509609#509609

Unfortunately any nginx module requires the right source of nginx to use it without weird linking problem with the nginx package provided by a distro.

You can grab the alpine releases from the nightly releases: https://github.com/wargio/naxsi/actions/runs/5310317532
or build it via docker

docker run --it --rm -v ./naxsi:/naxsi alpine:latest sh -c 'cd /naxsi; sh ./distros/alpine/build-ci.sh'

Thanks - I prefer to use a stable release than a nightly - is there a plan to release 1.5 / add the artefacts to 1.4?

i could try to backport and add the artifacts to 1.4