Updated on 2023-05-26 GMT+08:00

tag Command Execution Failed

Symptom 1

After you add the deployment action Run Docker Command and set Command to tag, the error message ...requires exactly 2 arguments... is displayed.

Cause Analysis

The possible causes are as follows:

  • Multiple groups of images are not separated by line breaks.
  • The format of the image tag is incorrect.

Solution

Perform the following operations based on the failure causes:

  • Separate multiple groups of images with line breaks.
  • Modify the image tag format as prompted.

Symptom 2

After you add the deployment action Run Docker Command and set Command to tag, the output indicates that the tag command is in the format of docker tag SOURCE_IMAGE[:TAG] TARGET_IMAGE[:TAG]... and that the execution parameters end with a line break.

Cause Analysis

One or more line breaks (\n) are mistakenly added to the end of the images to be tagged.

Solution

Delete the last line break in the text box for tagging multiple groups of images.