How force StackStorm Docker images to use python 2.7.11 or higher

Hi,

I want to replace python 2.7.6 in the docker image with 2.7.11 which is required for my python sensor. Does anybody have a recipe to do that. I was able to install 2.7.11 but stackstorm continue to use 2.7.6.

Thanks.

StackStorm services and components use Python binary from /opt/stackstorm/st2/bin/python and pack virtual environments use Python binary from /opt/stackstorm/virtualenvs/<pack name>/bin/python (which is a python binary copied from /opt/stackstorm/st2/bin/python during pack installation and virtual environment creation).

If you want to use a custom binary, you need to copy it to /opt/stackstorm/st2/bin/python and re-create virtual environments for all the affected packs (something along the lines of rm -rf /opt/stackstorm/packs/virtualenvs/<pack name>/ ; st2 run packs.setup_virtualenv packs=<pack name>, etc.) to make sure those virtual environments use the new binary.

This should work if you use Python binary which has been built for / compiled on the same system (same architecture, same underlying C libraries, etc.), but it’s not officially supported.

Great. I wiil give it a try. Thanks for the answer.