providers/docker: smarter about setting ID to nil for machine