This page intends to git hints on how to use Docker for packaging.

See https://anonscm.debian.org/cgit/docker/docker.io.git/tree/debian/Dockerfile for an example of the Dockerfile used to generate a build environment for the docker.io package itself.

See http://sfxpt.wordpress.com/2013/11/17/debianubuntu-package-developing-with-docker-continued/ for a more classical approach to the problem by sharing directories between the host and packaging containers.