Error building Service Virtualization images in Docker

Document ID : KB000004785
Last Modified Date : 14/02/2018
Show Technical Document Details
Issue:

(11)    Issue when building Service Virtualization images in Dockers 

 

(22)    Error below is seen
Execution failed for task ':dockerimages/devtest-jre:dockerImage'. 
> Docker execution failed 
Command line [docker tag -f devtest/devtest-jre:9.1.0.399 devtest/devtest-jre:latest] returned: 
unknown shorthand flag: 'f' in -f 
See 'docker tag --help'. 

Environment:
DevTest 8.X and 9.XDockers v1.10.0 and v1.12.0
Cause:

-f flag on docker tag is Deprecated In Release: v1.10.0 
Removed In Release: v1.12.0

https://docs.docker.com/engine/deprecated/ 

 “To make tagging consistent across the various docker commands, the -f flag on the docker tag command is deprecated. It is no longer necessary to specify -f to move a tag from one image to another. Nor will docker generate an error if the -f flag is missing and the specified tag is already in use.”

 

Resolution:

Modify the file buildSrc/src/main/groovy/com/ca/devtest/docker/NativeDockerClientEx.groovy

line 22

def cmdLine = "${binary} tag -f ${tag} ${newTag}"

 

to remove the -f