Rebase (or flatten) Docker images