
Ask HN: Why use Ansible/Puppet/Chef/Salt to build Docker images - iamskeptic
I have gone down this path but it seems I spend more time troubleshooting these tools than actually benefits from them.<p>What others think is a good way to build Docker images if you think Dockerfiles are limited and lead to spaghetti code?
======
dozzie
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).

~~~
iamskeptic
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.

------
miiiiiike
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.

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

------
smt88
[https://nixos.org](https://nixos.org) might help

