shell - How to delete docker after use in Jenkins -
i want delete remains of docker-operations within jenkins.
but somehow following line not work...
the issue seems parenthesis.
any advice?
if [ docker images -f dangling=true -q|wc -l > 0 ]; docker rmi --force $(docker images -f dangling=true -q);fi
i store output of docker images command , use it:
images=$(docker images -f dangling=true -q); if [[ ${images} ]]; docker rmi --force ${images}; fi
Comments
Post a Comment