Deploying and running applications using Docker
Dockerization is a process of packaging, deploying, and running applications using Docker containers. Containerizing FastAPI microservices saves installation and setup time, space, and resources. And containerized apps are replaceable, replicable, efficient, and scalable compared to the usual deployment packaging.
To pursue Dockerization, we need to install Docker Hub and/or Docker Engine for the CLI commands. But be aware of the new Docker Desktop License Agreement (https://www.docker.com/legal/docker-software-end-user-license-agreement/) regarding its new subscription model. This chapter mainly focuses on how to run CLI commands rather than the Docker Hub GUI tool. Now, let us generate the list of modules to be installed in the docker image.
Generating the requirements.txt file
Since we are using a virtual environment instance for module management, it is easy to identify what extension modules to install in the Docker image...