[GH-ISSUE #9] Run with NPM in docker container #4

Open
opened 2026-02-25 22:30:23 +03:00 by kerem · 0 comments
Owner

Originally created by @FlyingPersian on GitHub (Mar 25, 2022).
Original GitHub issue: https://github.com/ergin/nginx-cloudflare-real-ip/issues/9

Hello,

How do I run this when nginx proxy manager is running in a docker container?

I'm binding a folder into /etc/nginx/ and a data folder into /data. Within data, I created a file called http.conf in /data/nginx/custom added the following line to it (see here:

include /etc/nginx/cloudflare;

I added the file "cloudflare" to the folder I'm mounting to /etc/nginx/ like described in the instructions. I'm now struggling to create the cron tab to run the script. I found this, to setup a crontab, but it seems fairly complicated and I'm unsure whether it works or not.

After I setup everything, I connected to the sh shell of my container using portainer and ran the script, but I got this error:

nginx: error while loading shared libraries: libluajit-5.1.so.2: cannot open shared object file: No such file or directory

Also, I'd prefer to have this happen in real time so that my NPM logs reflect the real IPs right away.

Originally created by @FlyingPersian on GitHub (Mar 25, 2022). Original GitHub issue: https://github.com/ergin/nginx-cloudflare-real-ip/issues/9 Hello, How do I run this when nginx proxy manager is running in a docker container? I'm binding a folder into /etc/nginx/ and a data folder into /data. Within data, I created a file called http.conf in /data/nginx/custom added the following line to it (see [here](https://nginxproxymanager.com/advanced-config/#custom-nginx-configurations): `include /etc/nginx/cloudflare;` I added the file "cloudflare" to the folder I'm mounting to /etc/nginx/ like described in the instructions. I'm now struggling to create the cron tab to run the script. I found [this,](https://stackoverflow.com/questions/37458287/how-to-run-a-cron-job-inside-a-docker-container) to setup a crontab, but it seems fairly complicated and I'm unsure whether it works or not. After I setup everything, I connected to the sh shell of my container using portainer and ran the script, but I got this error: `nginx: error while loading shared libraries: libluajit-5.1.so.2: cannot open shared object file: No such file or directory` Also, I'd prefer to have this happen in real time so that my NPM logs reflect the real IPs right away.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-cloudflare-real-ip#4
No description provided.