Select Page
  1. If you develop new image it happens some builds failed. It such case you could use this small “one line” script to delete failed images:
    for id in $(sudo docker images|tr -s ' '|grep '^<none>'|cut -d' ' -f3); do echo $id; sudo docker rmi $id -f; done

    run it repeatedly – there are sometimes dependences between images

  2. To keep image running it must end with EXEC which will replace running shell with some other program – like with grafana server in grafana image or just with /bin/bash