Combining Chef And Docker Combining Chef And Docker docker docker

Combining Chef And Docker


I would suggest that if all you want to do is manage Docker images/containers, that you don't really need Chef.

Docker provides tools like:

  1. Fig (http://www.fig.sh/), which brings up multiple containers as one logical unit.
  2. Swarm (https://github.com/docker/swarm/), which allows you to abstract away the machines you have for deployments. For example, "My app needs 2GB of RAM, 1 CPU, 10GB of HD, which machine has available resources?"
  3. Machine (https://github.com/docker/machine), which allows you to create VMs in the cloud in pretty much any provider.
  4. A REST API (https://docs.docker.com/reference/api/docker_remote_api/), which allows you to remotely start/stop containers etc.

In my opinion those suite of tools replace the need for Chef if all you're going to do is manage Docker images and containers.

As someone already noted, don't change configs after a container has started. Better to make a new image or restart the container. You could also mount the configs external to the container and modify them there, then restart the container.