Tuesday, December 15, 2015

Docker lessons from the front lines


  • Be careful when mapping host volumes: filesystem types matter greatly in Docker, and something as simple as mapping /tmp or /dev from the host can result in obscure errors, e.g. Error response from daemon: Cannot start container xxxxxxx : [8] System error: no such file or directory
  • Default log file locations for the Docker daemon vary by distribution, typically determined by the init system:
    • /var/log/upstart/docker.log (Debian/Ubuntu)
    • /var/log/docker.log (CentOS)
  • Start Docker with debug logging.
    • Directly from command line: 
      • sudo DOCKER_OPTS='--log-level=debug' service docker start
    • Also possible through settings in /etc/default/docker.conf

No comments: