Possible to not log user IP addresses?

Sorry, i don’t meant to be rude. It’s kind of annoying to be left with unclear hints and not to know how to proceed.
The best info i’ve found on nginx and masking ip address is this blog post: Data Masking for User Privacy with the NGINX JavaScript Module – NGINX Community Blog
Here begins my problem: how do i implement this for Discourse? And not to lose the changes made with the next rebuild? I have installed Discourse via Docker which is the only supported way if i remember correctly.