Hacker News new | ask | show | jobs
Ask HN: Why use Ansible/Puppet/Chef/Salt to build Docker images
8 points by iamskeptic 3484 days ago
I have gone down this path but it seems I spend more time troubleshooting these tools than actually benefits from them.

What others think is a good way to build Docker images if you think Dockerfiles are limited and lead to spaghetti code?

3 comments

Ansible and Salt don't seem to fit the use case of configuring something that is effectively a chroot, and I don't know if Chef can be used with chroot-like installations, but you must have used Puppet in a wrong way if it caused you trouble (my guess is that you used Puppet with master, not a CFEngine-like masterless mode).
Actually I translated all the configuration that would be done through RUN commands in a Dockerfile, into Ansible roles and playbooks that are applied at build time.
I use make to build my docker images. It works really well.

`make update`: fetches the latest version of the code.

`make build`: builds the images.

`make push`: pushes them to the registry.

Salt's great tho, I use it to manage my Docker environment files and keep other systems up to date.

Do you use Salt from within a Dockerfile to make the changes inside the container?