I want to remove old docker images in my jenkins pipeline build, how can I escape single quotes ?
sh "docker rmi -f $(docker images -qa -f 'dangling=true')"
tried several options for escaping single quotes but getting below error:
solution: either escape a literal dollar sign “$5” or bracket the value
expression “${5}” @ line 26, column 6.
sh “docker rmi -f $(docker images -qa -f $’dangling=true$’)”