Stop/remove existing docker container if the specified tag is different

Fixes #8278