In a previous blog post we have seen how to use Docker for developing Python web applications. In this blog post we shall see how to deploy thusly dockerised web application on the CERN OpenStack cloud, for example to demonstrate the application to colleagues.
A Docker container is usually dedicated to running one daemon process, such as Apache to serve a web application. If the application needs a cache, or a database, then the container running the application is linked to another containing running the cache, and yet another container running the database. However, what if we need (or want) to run several daemon applications inside the same single container?
Docker became popular software solution permitting to deploy applications inside isolated Linux software containers. From a Python related point of view, one could consider Docker containers as "virtual environments on steroids", because they encapsulate and isolate not only application's Python pre-requisites (say given version of PyPDF2 package), but also any non-Python utilities of the operating system that the application relies on (say given version of LibreOffice). The following primer shows how to use Docker for developing Python applications.