Updated on 2024-08-06 GMT+08:00

rmi Command Execution Failed

Symptom 1

After you add the deployment action Run Docker Command and set Command to rmi, the error message image is referenced in multiple repositories is displayed.

Cause Analysis

The images indicated by image IDs belong to different repositories, or the image tags are different.

Solution

  • Identify the image to be deleted using its name and tag, for example, 12.12.12.12/test/aaaa:v1.
  • To delete all images related to an image ID, enter multiple groups of images in the execution parameters and separate them with spaces.

Symptom 2

After you add the deployment action Run Docker Command and set Command to rmi, the error message image is being used by running container is displayed.

Cause Analysis

The image to be deleted has been running and a container has been created using this image. The image cannot be deleted before the container is deleted.

Solution

Stop and delete the container, and then delete the image.