Revert "simplify image building"

WHOA that does not do what I thought it did.

This reverts commit 4e68b528a813f8112089ac7022fe2780e4c034f3.