Docker errors I've encountered and how I fixed them

Problem

ERROR: In file './docker-compose.yml' service 'version' doesn't have any configuration options. All top level keys in your docker-compose.yml must map to a dictionary of configuration options.

Solution

Update docker-compose to the latest version


Problem

After running docker-compose up, I get ERROR: Couldn't connect to Docker daemon - you might need to run 'docker-machine start default'

Solution
  • Restart your docker vm: docker-machine restart default
  • Run eval $(docker-machine env default)
  • +POINTS -- If this happens frequently, you might want to alias that last command: alias eval-docker="eval $(docker-machine env default)"