Docker is similar to a VM, only without all the excess overhead. That very same docker container, could be deployed to production, assuring that your production and dev environments are identical(same web server, same db version, etc). A docker container can be spun up in a matter of seconds on a linux machine. If you're using OS X, it will require a VM to run docker images(see boot2docker), but even with this, it's very low overhead.
To be honest, i've used Docker much more than Heroku so I may be biased. But a quick google search turned up this article, which I think explains the differences well: http://tuhrig.de/docker-vs-heroku/