Sometimes Jenkins jobs fail to cleanup the container images because the container is not yet shutdown. The failure looks like this,
14:41:52 Error response from daemon: conflict: unable to remove repository reference "us.gcr.io/apache-beam-testing/java-postcommit-it/java:20201113182944"
(must force) - container c28427d037c9 is using its referenced image 55ebc4bc6c8c
Adding the –force flag to the rmi command should resolve the issue.
Imported from Jira BEAM-11263. Original Jira may contain additional context.
Reported by: tysonjh.