Containerization pattern best practice
<p>I am dockerizing a Python webapp using the <a href="https://hub.docker.com/r/tiangolo/uwsgi-nginx" rel="nofollow">https://hub.docker.com/r/tiangolo/uwsgi-nginx</a> image, which uses supervisor to control the uWSGI instance.</p>

<p>My app actually requires an additional supervisor-mediated process to run (LibreOffice headless, with which I generate documents through the <code>appy</code> module), and I'm wondering what is the proper pattern to implement it.</p>

<p>The way I see it, I could extend the above image with the extra supervisor config for my needs (along with all the necessary OS-level install steps), but this would be in contradiction with the general principle of running the least amount of distinct processes in a given container. However, since my Python app is designed to talk with LibreOffice only locally, I'm not sure how I could achieve it with a more containerized approach. Thanks for any help or suggestion.</p>

<p>You've already blown the "one process per container" -- just add another process.   It's not a hard rule, or even one that everybody agrees with.</p>

<p>Extend away, or better yet author your own custom container.   That way you own it, you understand it, and it's optimized for your purpose.</p>

python nginx docker uwsgi supervisord