Share and learn in the Docker community.
So you alrady checked out https://github.com/quay/clair and studied the sources of clair?