2 Containerizing Your App
This chapter covers:
- How to containerize apps
- Running your container locally
- Executing commands in the container context
Containerizing your application, that is, packaging your application and its dependencies into an executable container is a required step before adopting Kubernetes. The good news is that containerizing your application has benefits beyond being able to deploy it into Kubernetes, it’s a valuable step on its own right, as you’re packaging up the application’s dependencies and can then run it anywhere without needing to install those dependencies on the host machine.
Regardless of how you deploy your app, containerizing it means that your developers can start working on it locally using Docker, enabling them to get started on a new project with no setup beyond installing Docker. It provides easy context switching between the different applications developers are working on, as the environments are completely isolated. These properties make it a valuable way to improve developer productivity even if you don’t end up deploying your app into production with containers (though you’ll probably want to do that too).