Hacker News new | ask | show | jobs
by jcurbo 4532 days ago
When I first looked at the Dockerfile format, my thought was, hey, another provisioning file format to learn. I guess you could just call chef/puppet/ansible/etc in your Dockerfile and call it a day though? I have not heavily used any of these tools so my perception of their overlap might be off.
2 comments

I did exactly that with Puppet as an experiment: http://kartar.net/2013/12/building-puppet-apps-inside-docker.... Works reasonably well. I will say though that the Dockerfile syntax is, IMHO, much easier to use than Puppet/Chef/etc.

Disclaimer: I work at Docker and previously worked at Puppet Labs.

I've tried this and it is not that easy, docker containers are meant to run one and only one process. So, for instance my puppet started an upstart job, and this crashes the docker build process.

I'm a docker newbie, though.

The Dockerfile shouldn't run any processes that need to persist between 2 stages as each stage will be created in a new instance. You can either do fancy one-liner bash scripts (my favorite) to configure simple service / app startup scripts, or include a configuration file from elsewhere using the `ADD` directive. The only non ephemeral command should be the final `CMD` or `ENTRYPOINT` as far as I can work out.

I too am just learning this stuff, but that should hopefully help you out!