Now you know what Docker is (and why everyone’s talking about it) you’re ready to read about docker use cases. In the third instalment of our Docker series, we delve into the variety of use cases that you may encounter, be currently tackling, or looking to explore.
Matching Environments for Apps
The good news about Docker containers is that the development, QA, testing, staging and production can now all run the exact same software via containers. Though, it’s worth noting that some specialisation may exist in each container. For example, the development image may be a superset of the production image with extra tools for debugging and so on, but based on the same core image.
Seperate images for different apps
It’s easy to have the images and containers for App A with its particular versions running alongside App B, for example. With Docker, there’s no longer a need to try to run a local version that supports both Apps.
CI & CD
On Docker your CI and CD platform can now match production exactly. You can have specialised images based on your containers that add build tools, then build the new container, so only software required to run the application is deploy – (que sigh of relief!)
Deployments, with Docker, now contain the whole stack and become immutable. This means testing can now be run across the app using hte same software it’ll run on for improved accuracy and reliability.
Hosting apps and sites with scalability in mind
Docker will encourage thinking of your app in components that may require scaling independently. This ultimately makes it easier to separate in the long run. For instance, database from application server if the separation is built into the codebase from the start.
Hosting apps and sites is easier with Docker as you can add more of any container that is needed allowing you to load balance accordingly.
Orchestration tools like Kubernetes will come in handy too. This tool lets your autoscale the number of containers and subsequently swap out containers with issues as needed as long as you have hardware available.
Isolating small sites away from each other
An alternative to shared hosting, Docker’s containers allow you to isolate small sites away from each other. This is a useful alternative to shared hosting as it’s more robust than separating access by users and groups.
In this use case, each site has its own container and partial OS.
One of the most invaluable benefits of Docker containers are that they are cheap. Cheap to create, iterate, and throw away. Making Docker containers ideal for experimentation and A/B testing.
You can isolate changes from other default containers. They can be easily and quickly be replaced if it fails. And you can see how the application may perform on another cloud provider by deploying the containers you are using.
Next up in our Docker series, we’ll be guiding you through Docker Concepts. Sign up for our newsletter to know when the next post is released.