Skip to content

Commit 00b9693

Browse files
committed
Switched to official docker image clearing
1 parent 8e6bfba commit 00b9693

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/app/CliTools/Console/Command/Docker/CleanupCommand.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,7 @@ protected function cleanDockerImages()
5858
{
5959
$this->output->writeln('<h2>Cleanup orphaned docker images</h2>');
6060
try {
61-
$command = new CommandBuilder('docker', 'images');
62-
$command
63-
->addPipeCommand( new CommandBuilder('grep', '"<none>"') )
64-
->addPipeCommand( new CommandBuilder('awk', '"{print \$3}"') )
65-
->addPipeCommand( new CommandBuilder('xargs', '--no-run-if-empty docker rmi -f') );
61+
$command = new CommandBuilder('docker', 'rmi $(docker images -qf "dangling=true")');
6662
$command->executeInteractive();
6763

6864
} catch (\Exception $e) {

0 commit comments

Comments
 (0)