sigproc/robotic_surgery — pull request #14 by hutchinsonjack (2014-11-14 12:24:18+00:00)
Title: Makefile: add DOCKER_BUILD_OPTS variable

Docker aggressively caches intermediate images so that repeated builds of the Docker image
are fast. In the case of apt-get update, however, this is dangerous since it means that the
package database is frozen at the point when the Docker image was originally created. Docker
provides a --no-cache option which will invalidate the intermediate image cache allowing
apt-get update to run again. This shouldn't be enabled by default as it massively increases
the time it takes an image to be built.

Add a DOCKER_BUILD_OPTS variable to the Makefile which can be used to append options to
calls to docker build on a case-by-case basis. One still needs to manually trigger a cache
invalidation but, as Dykstra said, there are only two hard problems in Computer Science:
naming things, cache invalidation and off-by-one errors.