4 ms·
We've been using Ansible to configure baremetal/VM servers as well as building Docker images. The advantage of using it with Docker is that we get to use someth
by gtirloni 11y ago
We've been using Ansible to configure baremetal/VM servers as well as building Docker images. The advantage of using it with Docker is that we get to use something more powerful and readable than what's possible with a Dockerfile (which tends to quickly turn into spaghetti/unreable code).
If the application being containerized adheres to some principles like taking configuration options from environment variables or some other discovery method, then Dockerfiles are simple enough. But you if have to do anything more than a few steps, we've found it more manageable to encapsulate the knowledge in an Ansible role.
We also build our own base images from scratch using Packer (which we love) and Jenkins (not so much love there). That being said, having the required packages for running Ansible inside the image does bloat things a little bit.
If Dockerfiles had more powerful and elegant constructs we could stop using Ansible and remove a layer of abstraction. That would be great.