mirror of
https://github.com/thegeeklab/wp-docker-buildx.git
synced 2024-11-25 19:20:39 +00:00
Use "dangling" filter instead of grepping when cleaning up images
This commit is contained in:
parent
2bf7ebf219
commit
2ab987b917
2
main.go
2
main.go
@ -231,7 +231,7 @@ func main() {
|
|||||||
|
|
||||||
// Remove untagged images, if any
|
// Remove untagged images, if any
|
||||||
var outbuf bytes.Buffer
|
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.Stdout = &outbuf
|
||||||
cmd.Stderr = os.Stderr
|
cmd.Stderr = os.Stderr
|
||||||
trace(cmd)
|
trace(cmd)
|
||||||
|
Loading…
Reference in New Issue
Block a user