Over the past year, Docker has transformed how we do DevOps at Yhat. We use it for development, testing, and creating distributions of our software. But building hundreds of Docker images can take a lot of compute time and disk. This talk shows how to reduce the cost of maintaining large Docker infrastructure with optimization, graph theory, and Python.