Looking for advice on how I can run celery pdb inside my docker container while port forwarding so i can access from the outside world.
I am following the guide at http://celery.readthedocs.org/en/latest/tutorials/debugging.html
The issue I am facing is that even when I tell the container.
-e CELERY_RDB_HOST='0.0.0.0' -e CELERY_RDB_PORT='6900' -p 6900:6900.
And get to the breakpoint in the app, the port that actually gets open is not what I asked for so my port forward no longer is valid.... Eg. the port 6902 gets opened instead, and no matter what I ask the port to be, it changes again to not what I asked for.
I know it chooses from a list of 100 ports that it deems 'available' but not sure how to get around this problem. Any advise would be welcome.
Thanks!
You can run your container by specifying a range of ports (see http://docs.docker.com/reference/run/#expose-incoming-ports):
docker run -d -e CELERY_RDB_HOST='0.0.0.0' -p 6900-7000:6900-7000 celery
After that, when you hit your breakpoint, you just need to telnet into it:
telnet localhost 6902
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With