8 Docker Deployment Patterns
Join the DZone community and get the full member experience.Join For Free
I recently came across an interesting blog post that pulls together some different Docker design patterns that you might find useful. Vidar Hokstad wrote this blog article, and he has quite a bit of experience with Docker, especially in using Docker to create repeatable builds without data loss. His experience with Docker makes his curation of these patterns all that much more valuable. He sums up his central purpose pretty clearly:
Hokstad's list of patterns includes:
The examples Dockerfiles below are all focused on that: Creating containers where the containers themselves can be replaced at any time without having to think about it.The more regularly the containers are recreated; the more habitual this becomes, the more it reinforces a habit of avoiding state outside of clearly defined locations that are explicitly persisted.
- The Shared Base Container(s)
- The Shared Volume Dev Container
- The Dev Tools Container
- The Test in a Different Environment Containers
- The Build Container
- The Installation Container
- The Default-Service-in-a-Box Containers
- The Infrastructure / Glue Containers
Opinions expressed by DZone contributors are their own.