title: How to delete docker images in Jenkins Job
body: <p>I want to delete the remains of some Docker-operations from within Jenkins.</p>
  
  <p>But somehow the following line does not work...</p>
  
  <p>The issue seems to be with the parenthesis.</p>
  
  <p>Any advice?</p>
  
  <pre><code>if [ docker images -f dangling=true -q|wc -l &gt; 0 ]; then docker rmi --force $(docker images -f dangling=true -q);fi
  </code></pre>