0
0
mirror of https://github.com/thegeeklab/wp-docker-buildx.git synced 2024-11-10 03:30:40 +00:00

Use "dangling" filter instead of grepping when cleaning up images

This commit is contained in:
Martin Honermeyer 2016-01-03 14:17:15 +01:00
parent 2bf7ebf219
commit 2ab987b917

View File

@ -231,7 +231,7 @@ func main() {
// Remove untagged images, if any
var outbuf bytes.Buffer
cmd = exec.Command("sh", "-c", "docker images | grep '^<none>' | awk '{print $3}'")
cmd = exec.Command("docker", "images", "-q", "-f", "dangling=true")
cmd.Stdout = &outbuf
cmd.Stderr = os.Stderr
trace(cmd)