When comparing Chef vs Docker, the Slant community recommends Docker for most people. In the question“What are the best WordPress deployment tools?” Docker is ranked 4th while Chef is ranked 6th. The most important reason people chose Docker is:
Docker creates a single object, containing an application with its dependencies, that can be moved between any docker-enabled machines, guaranteeing the same environment for application execution.
Specs
Ranked in these QuestionsQuestion Ranking
Pros
Pro Large community
Chef has a relatively large community. One of the reasons for it is the fact that it's a pretty old and mature tool. Chef, originally released in 2009, is a more mature product. Being popular and with a large and dedicated community means that Chef has lots and lots of resources and guides from third party sources out there for beginners to pick up. Not only that, there are also many plugins and configuration recipes made by the community.
Pro Cross-platform
Chef is cross-platform. Offering support for the biggest platforms out there: Linux, Windows and *nix.
Pro Popular choice among large companies
Chef has an impressive list of companies using it's automation service. Among them is Facebook, Etsy, Ancestry.com, PharmMD and Yahoo.
Pro Strong version control capabilities
Chef is centered around Git for it's configuration and deployments. Because of this, Chef also has great version control capabilities through Git.
Pro Mature
Chef was released in 2009, which is relatively a long time ago for software. Since then it has been through several versions and many bug fixes and tests. All of this can make Chef more appealing to teams who are looking for stability and maturity, which are things that Chef brings on the table.
Pro Allows for portable application deployment
Docker creates a single object, containing an application with its dependencies, that can be moved between any docker-enabled machines, guaranteeing the same environment for application execution.
Pro Git-like capabilities
Docker tracks changes in systems. It allows for commits and rollbacks and for quick deployment due to having to deploy only the updated code.
Pro Allows re-using components
Docker essentially allows creating boilerplate systems (a LAMP stack, for example) that can be used as a starting point on multiple projects. And you can find multiple such containers already created by people in their public registry.
Pro Automatic build
Allows automatically assembling a container from its source code.
Pro Provides easy sharing and installation of containers through a public registry
Docker allows easily pushing and pulling containers to and from their public index.docker.io registry. Additionally, dotCloud maintains a list of official repositories of the more popular containers.
Pro Application-centric
Pro Works in virtualized environments
You can set up Docker within an already virtualized environment such as a virtual machine. This allows you to run Docker on Mac and Windows, among other use-cases.
Pro Low overhead
Pro Supports a wide range of isolation tools
Docker can be used with OpenVZ, systemd-nspawn, libvirt-lxc, libvirt-sandbox, qemu/kvm, BSD Jails, Solaris Zones, and chroot.
Pro Tool ecosystem
Cons
Con Ties you to Ruby
Chef is written in Ruby and its CLI uses a Ruby-based DSL. In order to fully use and customize it you need to use Ruby as Chef does not give users any other choice when it comes to languages to use to configure it.
Con Steep learning curve
Chef has a steeper learning curve than many of its competitors, making it a more difficult tool for the non-devs of a team (such as sysadmins) to work with. For some teams, the added cost of teaching Chef to the team may outweigh the benefits.