11 lines
391 B
Bash
11 lines
391 B
Bash
#!/bin/sh
|
|
|
|
# prune *all* images not currently used
|
|
docker image prune -af
|
|
# prune unused volumes (we keep all state host-mounts)
|
|
docker volume prune -f
|
|
# prune images, containers, networks etc. but keep potentially used one (no -a)
|
|
docker system prune -f
|
|
# update left-over images
|
|
docker images | grep -v "^REPO" | grep -v "^<none>" | sed 's/ \+/:/g' | cut -d: -f1,2 | xargs -L1 docker pull
|