CovertLab / sisyphus

Eternally execute tasks
0 stars 0 forks source link

Make sisyphus delete each exited docker container #8

Closed 1fish2 closed 5 years ago

1fish2 commented 5 years ago

Make sisyphus delete each exited docker container.

Also clean out old containers when making the next sisyphus disk image.

jerry@sisyphus-a:~$ sudo docker container ls --all
CONTAINER ID        IMAGE                                                                 COMMAND                  CREATED             STATUS                         PORTS               NAMES
c0ee5fdc48ea        gcr.io/allen-discovery-center-mcovert/mialydefelice-wcm-code:latest   "python -u -m wholec…"   16 minutes ago      Up 16 minutes                                      vigilant_driscoll
133dc27b88ec        gcr.io/allen-discovery-center-mcovert/mialydefelice-wcm-code:latest   "python -u -m wholec…"   40 minutes ago      Exited (0) 19 minutes ago                          compassionate_galileo
270fdbcdbad2        gcr.io/allen-discovery-center-mcovert/mialydefelice-wcm-code:latest   "python -u -m wholec…"   About an hour ago   Exited (0) 43 minutes ago                          agitated_mendeleev
4dab479d6f36        gcr.io/allen-discovery-center-mcovert/mialydefelice-wcm-code:latest   "python -u -m wholec…"   About an hour ago   Exited (0) About an hour ago                       mystifying_banach
c6ce0396fbdd        gcr.io/allen-discovery-center-mcovert/mialydefelice-wcm-code:latest   "python -u -m wholec…"   2 hours ago         Exited (0) About an hour ago                       optimistic_lamarr
7d05dfed9469        gcr.io/allen-discovery-center-mcovert/mialydefelice-wcm-code:latest   "python -u -m wholec…"   2 hours ago         Exited (0) 2 hours ago                             loving_gagarin
03ead049bd1a        gcr.io/allen-discovery-center-mcovert/mialydefelice-wcm-code:latest   "python -u -m wholec…"   2 hours ago         Exited (0) 2 hours ago                             xenodochial_ride
88f6e6bc886c        gcr.io/allen-discovery-center-mcovert/mialydefelice-wcm-code:latest   "python -u -m wholec…"   3 hours ago         Exited (0) 2 hours ago                             practical_knuth
350541b53dba        gcr.io/allen-discovery-center-mcovert/mialydefelice-wcm-code:latest   "python -u -m wholec…"   3 hours ago         Exited (0) 3 hours ago                             stoic_shaw
0c75548178df        gcr.io/allen-discovery-center-mcovert/mialydefelice-wcm-code:latest   "python -u -m wholec…"   3 hours ago         Exited (0) 3 hours ago                             adoring_mccarthy
63de865bd4b4        gcr.io/allen-discovery-center-mcovert/mialydefelice-wcm-code:latest   "python -u -m wholec…"   4 hours ago         Exited (0) 3 hours ago                             reverent_mestorf
0c31741bdb4e        gcr.io/allen-discovery-center-mcovert/mialydefelice-wcm-code:latest   "python -u -m wholec…"   4 hours ago         Exited (0) 4 hours ago                             naughty_vaughan
6b458fcce6a5        gcr.io/allen-discovery-center-mcovert/mialydefelice-wcm-code:latest   "python -u -m wholec…"   5 hours ago         Exited (0) 4 hours ago                             suspicious_rubin
dc03952145b6        gcr.io/allen-discovery-center-mcovert/mialydefelice-wcm-code:latest   "python -u -m wholec…"   5 hours ago         Exited (0) 5 hours ago                             nervous_swartz
bb5fe3dedeef        alpine:latest                                                         "sh -c 'md5sum /mnt/…"   7 weeks ago         Exited (0) 7 weeks ago                             pensive_meninsky
dfa6f440ced3        alpine:latest                                                         "sh -c 'md5sum /mnt/…"   7 weeks ago         Exited (0) 7 weeks ago                             kind_brahmagupta
c700502ae3bb        alpine:latest                                                         "sh -c 'md5sum /mnt/…"   7 weeks ago         Exited (0) 7 weeks ago                             quizzical_leakey
8bd12cd1802a        alpine:latest                                                         "sh -c 'md5sum /mnt/…"   7 weeks ago         Exited (0) 7 weeks ago                             optimistic_elbakyan
96697ca02b70        alpine:latest                                                         "sh -c 'md5sum /mnt/…"   7 weeks ago         Exited (0) 7 weeks ago                             gifted_panini
1b57ff221875        alpine:latest                                                         "sh -c 'md5sum /mnt/…"   7 weeks ago         Exited (0) 7 weeks ago                             blissful_hamilton
2f0ecdeb4db8        alpine:latest                                                         "sh -c 'md5sum /mnt/…"   7 weeks ago         Exited (0) 7 weeks ago                             mystifying_cartwright
957ad6944c54        alpine:latest                                                         "bash -c 'md5sum /mn…"   7 weeks ago         Created                                            wizardly_lewin